mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-28 03:16:25 -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:
|
if not self.data:
|
||||||
return None
|
return None
|
||||||
try:
|
try:
|
||||||
return bytes(self.data, 'utf-8')
|
return self.data.decode('utf-8')
|
||||||
except UnicodeDecodeError:
|
except UnicodeDecodeError:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user