migration-merged-fixes

This commit is contained in:
2022-06-25 22:30:53 +03:00
4 changed files with 10 additions and 5 deletions

View File

@@ -110,7 +110,7 @@ def migrate(entry, users_by_oid, topics_by_oid):
if entry.get('type') == 'Literature':
media = entry.get('media', '')
# print(media[0]['literatureBody'])
if type(media) == list:
if type(media) == list and media:
body_orig = media[0].get('literatureBody', '')
if body_orig == '':
print('EMPTY BODY!')