From dda5705fab324c527edd7207bbb076eedc64cf4f Mon Sep 17 00:00:00 2001 From: Rohan Moniz Date: Sun, 24 Sep 2023 03:23:02 -0400 Subject: [PATCH] temp fix for saving external url --- backend/clubs/serializers.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/clubs/serializers.py b/backend/clubs/serializers.py index 4bbc51df9..aeb35dada 100644 --- a/backend/clubs/serializers.py +++ b/backend/clubs/serializers.py @@ -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