12237 fix data_as_string

This commit is contained in:
Arthur 2023-06-14 16:09:47 -07:00
parent 4d996dc833
commit 0de4d0a2e1

View File

@ -290,6 +290,8 @@ class DataFile(models.Model):
@property
def data_as_string(self):
if not self.data:
return None
try:
return bytes(self.data, 'utf-8')
except UnicodeDecodeError: