mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-27 19:08:38 -06:00
Fixes #13656: Correct decoding of BinaryField content for Django 4.2
This commit is contained in:
parent
4cc4d232e8
commit
b60fb8aa1a
@ -316,7 +316,7 @@ class DataFile(models.Model):
|
||||
if not self.data:
|
||||
return None
|
||||
try:
|
||||
return bytes(self.data, 'utf-8')
|
||||
return self.data.decode('utf-8')
|
||||
except UnicodeDecodeError:
|
||||
return None
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user