Ticket #32392: constraints.diff

File constraints.diff, 638 bytes (added by Tilman Koschnick, 4 years ago)
  • django/contrib/postgres/constraints.py

    diff --git a/django/contrib/postgres/constraints.py b/django/contrib/postgres/constraints.py
    index a844b899b7..00c6649d27 100644
    a b class ExclusionConstraint(BaseConstraint):  
    8080            except IndexError:
    8181                pass
    8282            sql = sql % tuple(schema_editor.quote_value(p) for p in params)
    83             expressions.append('%s WITH %s' % (sql, operator))
     83            expressions.append('(%s) WITH %s' % (sql, operator))
    8484        return expressions
    8585
    8686    def _get_condition_sql(self, compiler, schema_editor, query):
Back to Top