Skip to content

Commit 1408581

Browse files
committed
add list_id to serializer
1 parent c6c8b27 commit 1408581

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

accounts/api.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ def get(self, request: Request, *args, **kwargs):
431431
{"message": f"Account with ID {account_id} not found."}, status=404
432432
)
433433

434-
registrations = ListRegistration.objects.filter(registrant=account)
434+
registrations = ListRegistration.objects.filter(registrant=account).select_related('registered_by', 'registrant')
435435
status_param = request.query_params.get("status")
436436
if status_param:
437437
if status_param not in ListRegistrationStatus.values:

lists/serializers.py

+1
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ class Meta:
4848
model = ListRegistration
4949
fields = [
5050
"id",
51+
"list_id",
5152
"registrant",
5253
"registered_by",
5354
"status",

0 commit comments

Comments
 (0)