Changes between Initial Version and Version 1 of Ticket #31956, comment 18
- Timestamp:
- Jun 21, 2023, 12:25:45 PM (17 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #31956, comment 18
initial v1 4 4 5 5 {{{ 6 import json7 6 import psycopg2 8 from django.db.backends.signals import connection_created9 7 10 8 _original_jsonb_function = None 11 def _handle_jsonb( sender, connection, **kwargs):9 def _handle_jsonb(): 12 10 """ 13 11 Workaround for pipeline-altering solution in: … … 22 20 if _original_jsonb_function is None: 23 21 _original_jsonb_function = psycopg2.extras.register_default_jsonb 24 _original_jsonb_function(globally=True)22 # _original_jsonb_function(globally=True, loads=...) if required 25 23 psycopg2.extras.register_default_jsonb = _ignore_command 26 24 … … 30 28 31 29 def ready(self): 32 connection_created.connect(_handle_jsonb)30 _handle_jsonb() 33 31 }}} 34 32