Skip to content
This repository was archived by the owner on Oct 2, 2024. It is now read-only.

Commit a7d133f

Browse files
committed
Azure storage requires ContentFiles to be bytes
1 parent c5a225d commit a7d133f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

wagtailreacttaxonomy/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def update_taxonomy_terms_on_blobstore(sender, instance, **kwargs):
2727
content['terms'] = terms_with_vocab
2828

2929
blobPath = f'taxonomy/{instance.taxonomy_id}.json'
30-
blobFile = ContentFile (to_json (content))
30+
blobFile = ContentFile (to_json (content).encode ())
3131
default_storage.save (blobPath, blobFile)
3232
logger.info('Successfully wrote taxonomy json to BlobStore %s', blobPath)
3333

0 commit comments

Comments
 (0)