You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2018/07/23 23:27:43 UTC

[GitHub] graceguo-supercat closed pull request #5468: fix migration 3dda56f1c

graceguo-supercat closed pull request #5468: fix migration 3dda56f1c
URL: https://github.com/apache/incubator-superset/pull/5468
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/requirements.txt b/requirements.txt
index 80af3c7b7a..b81e178948 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -17,6 +17,7 @@ geopy==1.11.0
 gunicorn==19.8.0
 humanize==0.5.1
 idna==2.6
+isodate==0.6.0
 markdown==2.6.11
 pandas==0.23.1
 parsedatetime==2.0.0
diff --git a/setup.py b/setup.py
index 8db1597c0c..38c39a8921 100644
--- a/setup.py
+++ b/setup.py
@@ -75,6 +75,7 @@ def get_git_sha():
         'gunicorn',  # deprecated
         'humanize',
         'idna',
+        'isodate',
         'markdown',
         'pandas>=0.18.0',
         'parsedatetime',
diff --git a/superset/migrations/versions/3dda56f1c4c6_migrate_num_period_compare_and_period_.py b/superset/migrations/versions/3dda56f1c4c6_migrate_num_period_compare_and_period_.py
index c2a0d9af27..fef8bb81a1 100644
--- a/superset/migrations/versions/3dda56f1c4c6_migrate_num_period_compare_and_period_.py
+++ b/superset/migrations/versions/3dda56f1c4c6_migrate_num_period_compare_and_period_.py
@@ -125,7 +125,7 @@ def upgrade():
     session = db.Session(bind=bind)
 
     for chart in session.query(Slice):
-        params = json.loads(chart.params)
+        params = json.loads(chart.params or '{}')
 
         if not params.get('num_period_compare'):
             continue
@@ -150,7 +150,7 @@ def downgrade():
     session = db.Session(bind=bind)
 
     for chart in session.query(Slice):
-        params = json.loads(chart.params)
+        params = json.loads(chart.params or '{}')
 
         if 'time_compare' in params or 'comparison_type' in params:
             params.pop('time_compare', None)


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org