Skip to content

Commit

Permalink
check if migration json fields are none when converting to dict (#301
Browse files Browse the repository at this point in the history
…WIP)
  • Loading branch information
wpbonelli committed May 27, 2022
1 parent a700c17 commit f9a7044
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plantit/plantit/queries.py
Original file line number Diff line number Diff line change
Expand Up @@ -755,8 +755,8 @@ def migration_to_dict(migration: Migration) -> dict:
'completed': None if migration.completed is None else migration.completed.isoformat(),
'target_path': migration.target_path,
'num_folders': migration.num_folders,
'storage': json.loads(migration.storage),
'uploads': json.loads(migration.uploads)
'storage': json.loads(migration.storage if migration.storage is not None else '[]'),
'uploads': json.loads(migration.uploads if migration.uploads is not None else '[]')
}


Expand Down

0 comments on commit f9a7044

Please sign in to comment.