Skip to content

Commit

Permalink
Skip empty strings too
Browse files Browse the repository at this point in the history
  • Loading branch information
willgearty committed Dec 24, 2024
1 parent 5c86840 commit 7663cf9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion esp/esp/dbmail/migrations/0007_repickle_specialheaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
def resave_special_headers(apps, schema_editor):
MessageRequest = apps.get_model('dbmail', 'MessageRequest')
for mr in MessageRequest.objects.all():
if mr.special_headers != None:
if mr.special_headers != None and mr.special_headers != '':
special_headers = pickle.loads(mr.special_headers.replace('\r\n', '\n').encode('latin1'))
mr.special_headers = json.dumps(special_headers)
mr.save()
Expand Down

0 comments on commit 7663cf9

Please sign in to comment.