Skip to content

Commit

Permalink
fix: add template_type as a SerializerMethodField
Browse files Browse the repository at this point in the history
  • Loading branch information
kallilsouza committed Jan 7, 2025
1 parent 59d48aa commit efc21e0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions connect/api/v1/project/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,13 @@ class Meta:
first_access = serializers.SerializerMethodField()
wa_demo_token = serializers.SerializerMethodField()
redirect_url = serializers.SerializerMethodField()
template_type = serializers.SerializerMethodField()

def get_template_type(self, obj):
if obj.is_template and obj.template_project.exists():
return f"template:{obj.template_type}"
else:
return "blank"

def get_flow_uuid(self, obj):
if obj.is_template and obj.template_project.exists():
Expand Down

0 comments on commit efc21e0

Please sign in to comment.