Skip to content
Snippets Groups Projects
Verified Commit 8d32fab1 authored by Ernesto Rico Schmidt's avatar Ernesto Rico Schmidt
Browse files

feat: exclude fields from profile serializer in calendar

parent d1681848
No related branches found
No related tags found
1 merge request!52new program endpoint
......@@ -1338,6 +1338,18 @@ class CalendarSchemaSerializer(serializers.Serializer):
model = TimeSlot
exclude = ["memo"]
class CalendarProfileSerializer(serializers.ModelSerializer):
class Meta:
model = Profile
exclude = [
"created_at",
"created_by",
"is_active",
"owners",
"updated_at",
"updated_by",
]
class Wrapper:
def __init__(self, program: list[ProgramEntry]):
self.program = program
......@@ -1409,7 +1421,7 @@ class CalendarSchemaSerializer(serializers.Serializer):
shows = CalendarShowSerializer(many=True)
timeslots = CalendarTimeslotSerializer(many=True)
profiles = ProfileSerializer(many=True)
profiles = CalendarProfileSerializer(many=True)
categories = CategorySerializer(many=True)
funding_categories = FundingCategorySerializer(many=True)
types = TypeSerializer(many=True)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment