Skip to content

Commit

Permalink
temp fix for saving external url
Browse files Browse the repository at this point in the history
  • Loading branch information
rm03 committed Sep 24, 2023
1 parent 8f3d74e commit dda5705
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion backend/clubs/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -2607,8 +2607,9 @@ class ClubApplicationSerializer(ClubRouteMixin, serializers.ModelSerializer):
active = serializers.SerializerMethodField("get_active", read_only=True)

def get_external_url(self, obj):
ext_url = self.context["request"].data.get("external_url")
default_url = f"https://pennclubs.com/club/{obj.club.code}/application/{obj.pk}"
return obj.external_url if obj.external_url else default_url
return ext_url if ext_url else default_url

def get_cycle(self, obj):
return obj.application_cycle.name if obj.application_cycle else obj.season
Expand Down

0 comments on commit dda5705

Please sign in to comment.