Commits

Mike Fogel committed 49a1844

Multi-db support

  • Participants
  • Parent commits 85e0ae3

Comments (0)

Files changed (1)

File jsonfield/fields.py

         # (Protip: nothing does, at this stage).
         cursor = connection.cursor()
         try:
-            sid = transaction.savepoint()
+            sid = transaction.savepoint(using=connection.alias)
             cursor.execute('SELECT \'{}\'::json = \'{}\'::json;')
         except DatabaseError:
-            transaction.savepoint_rollback(sid)
+            transaction.savepoint_rollback(sid, using=connection.alias)
             return 'text'
         else:
             return 'json'