Skip to content

Commit

Permalink
Update serializers.py
Browse files Browse the repository at this point in the history
  • Loading branch information
idabblewith committed Oct 21, 2024
1 parent 37eb238 commit 38df950
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions adminoptions/serializers.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# region IMPORTS ====================================================================================================
from rest_framework import serializers
from adminoptions.models import AdminOptions, AdminTask, Caretaker
from users.models import User
from users.serializers import MiniUserSerializer

# endregion =================================================================================================
Expand Down Expand Up @@ -41,7 +42,15 @@ class Meta:
)


class IAdminTaskRequesterSerializer(serializers.ModelSerializer):
class Meta:
model = User
fields = ["pk", "display_first_name", "display_last_name"]


class AdminTaskSerializer(serializers.ModelSerializer):
requester = IAdminTaskRequesterSerializer()

class Meta:
model = AdminTask
fields = "__all__"
Expand Down

0 comments on commit 38df950

Please sign in to comment.