Skip to content

Commit

Permalink
fix migration 3dda56f1c (apache#5468)
Browse files Browse the repository at this point in the history
* fix migration 3dda56f1c

* add isodate to setup.py:

(cherry picked from commit bea0a0a)
  • Loading branch information
timifasubaa authored and Grace Guo committed Jul 26, 2018
1 parent 1604d8b commit 4f138e5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.22.0
parsedatetime==2.0.0
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ def get_git_sha():
'gunicorn', # deprecated
'humanize',
'idna',
'isodate',
'markdown',
'pandas',
'parsedatetime',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down

0 comments on commit 4f138e5

Please sign in to comment.