From 11aefa479b9c6844b1ccf534785cb89bdbf360cc Mon Sep 17 00:00:00 2001 From: ibuler Date: Tue, 16 Oct 2018 10:56:25 +0800 Subject: [PATCH] =?UTF-8?q?[Bugfix]=20=E4=BF=AE=E5=A4=8Dcommon=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/common/forms.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/common/forms.py b/apps/common/forms.py index 00f6af3d2..610e1a83e 100644 --- a/apps/common/forms.py +++ b/apps/common/forms.py @@ -18,6 +18,9 @@ class BaseForm(forms.Form): db_value = getattr(common_settings, name) django_value = getattr(settings, name) if hasattr(settings, name) else None + if db_value is None and django_value is None: + continue + if db_value is False or db_value: if isinstance(db_value, dict): db_value = json.dumps(db_value)