Skip to content

Commit 0eea5dd

Browse files
committed
fix deprecated check
1 parent 761eeac commit 0eea5dd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

mssql/functions.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,10 @@ def _get_check_sql(self, model, schema_editor):
281281
query = Query(model=model, alias_cols=False)
282282
else:
283283
query = Query(model=model)
284-
where = query.build_where(self.check)
284+
if VERSION >= (5, 1):
285+
where = query.build_where(self.condition)
286+
else:
287+
where = query.build_where(self.check)
285288
compiler = query.get_compiler(connection=schema_editor.connection)
286289
sql, params = where.as_sql(compiler, schema_editor.connection)
287290
if schema_editor.connection.vendor == 'microsoft':

0 commit comments

Comments
 (0)