Explorar el Código

Fixes #13656: Correct decoding of BinaryField content for Django 4.2

Jeremy Stretch hace 2 años
padre
commit
296166da95
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      netbox/core/models/data.py

+ 1 - 1
netbox/core/models/data.py

@@ -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