Skip to content

Commit

Permalink
fix: give image file in binary format to thumbhash
Browse files Browse the repository at this point in the history
  • Loading branch information
ericswpark committed Jul 14, 2023
1 parent bea68d1 commit 0b9dad8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,6 @@ def device_photo_thumbhash_generate():

for device in target_devices:
# Open image for reading
with device.photo.open("r") as photo:
with device.photo.open("rb") as photo:
device.photo_thumbhash = image_to_thumbhash(photo)
device.save()

0 comments on commit 0b9dad8

Please sign in to comment.