Skip to content
Snippets Groups Projects
Commit 3b83c327 authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Fix monkey patch of JSONEncoder

parent 06d973bf
No related branches found
No related tags found
1 merge request!601Resolve "favicon / icon generation mauls database"
Pipeline #10702 failed
......@@ -281,6 +281,6 @@ def monkey_patch() -> None: # noqa
class DjangoJSONEncoder(json.DjangoJSONEncoder):
def default(self, o: Any) -> Any:
if isinstance(o, Promise) and hasattr(o, "copy"):
return super().encode(o.copy())
return o.copy()
return super().default(o)
json.DjangoJSONEncoder = DjangoJSONEncoder
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment