You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by jo...@apache.org on 2019/03/20 23:55:42 UTC

[incubator-superset] 01/01: Update c617da68de7d_form_nullable.py

This is an automated email from the ASF dual-hosted git repository.

johnbodley pushed a commit to branch john-bodley--migration-c617da68de7d-patch
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git

commit 431f8e723d7471b86f7b79d50c1f2f5aab377332
Author: John Bodley <45...@users.noreply.github.com>
AuthorDate: Wed Mar 20 16:55:30 2019 -0700

    Update c617da68de7d_form_nullable.py
---
 superset/migrations/versions/c617da68de7d_form_nullable.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/superset/migrations/versions/c617da68de7d_form_nullable.py b/superset/migrations/versions/c617da68de7d_form_nullable.py
index b2281e8..dfcc2b3 100644
--- a/superset/migrations/versions/c617da68de7d_form_nullable.py
+++ b/superset/migrations/versions/c617da68de7d_form_nullable.py
@@ -179,7 +179,7 @@ def upgrade():
         for record in session.query(table).all():
             for col in record.__table__.columns.values():
                 if not col.primary_key:
-                    if getattr(record, col.name) == '':
+                    if getattr(record, col.name).strip() == '':
                         setattr(record, col.name, None)
 
         session.commit()