perf: 修复基本设置中的 base_site 可能带 / 的问题

pull/7404/head
ibuler 3 years ago committed by Jiangjie.Bai
parent eb3165f8e7
commit b113eeb1d6

@ -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('/')

Loading…
Cancel
Save