Skip to content

Commit

Permalink
fix deprecated check
Browse files Browse the repository at this point in the history
  • Loading branch information
mShan0 committed Jun 4, 2024
1 parent 761eeac commit 0eea5dd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mssql/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,10 @@ def _get_check_sql(self, model, schema_editor):
query = Query(model=model, alias_cols=False)
else:
query = Query(model=model)
where = query.build_where(self.check)
if VERSION >= (5, 1):
where = query.build_where(self.condition)
else:
where = query.build_where(self.check)
compiler = query.get_compiler(connection=schema_editor.connection)
sql, params = where.as_sql(compiler, schema_editor.connection)
if schema_editor.connection.vendor == 'microsoft':
Expand Down

0 comments on commit 0eea5dd

Please sign in to comment.