Open the image file as binary.

This commit is contained in:
Feanil Patel
2019-10-18 13:59:08 -04:00
parent 91e5ab93de
commit ac76eda862

View File

@@ -22,7 +22,7 @@ def forwards(apps, schema_editor):
file_name = '{0}{1}'.format(mode, '.png')
conf.icon.save(
'badges/{}'.format(file_name),
File(open(settings.PROJECT_ROOT / 'static' / 'images' / 'default-badges' / file_name))
File(open(settings.PROJECT_ROOT / 'static' / 'images' / 'default-badges' / file_name, 'rb'))
)
conf.save()