diff --git a/apps/settings/serializers/basic.py b/apps/settings/serializers/basic.py index 4f38e2fd5..97ef96cbe 100644 --- a/apps/settings/serializers/basic.py +++ b/apps/settings/serializers/basic.py @@ -44,3 +44,10 @@ class BasicSettingSerializer(serializers.Serializer): TICKETS_ENABLED = serializers.BooleanField(required=False, default=True, label=_("Enable tickets")) ANNOUNCEMENT_ENABLED = serializers.BooleanField(label=_('Enable announcement'), default=True) ANNOUNCEMENT = AnnouncementSerializer(label=_("Announcement")) + + @staticmethod + def validate_SITE_URL(s): + if not s: + return 'http://127.0.0.1' + return s.strip('/') +