[Bugfix] 修复创建用户common_settings.SITE_URL 为None的bug (#2027)

pull/2028/head^2
BaiJiangJie 2018-11-13 14:59:29 +08:00 committed by 老广
parent fd6e561d4b
commit 28b6144189
1 changed files with 2 additions and 1 deletions

View File

@ -38,7 +38,8 @@ def reverse(view_name, urlconf=None, args=None, kwargs=None,
if external:
from common.models import common_settings
url = common_settings.SITE_URL.strip('/') + url
site_url = common_settings.SITE_URL or settings.SITE_URL
url = site_url.strip('/') + url
return url