lookups: Adjust for django-stubs change.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2025-06-17 14:31:09 -07:00
committed by Tim Abbott
parent 750a08ad17
commit 47aa34097b

View File

@@ -14,7 +14,7 @@ class AndZero(models.Lookup[int]):
) -> tuple[str, list[str | int]]: # nocoverage # currently only used in migrations
lhs, lhs_params = self.process_lhs(compiler, connection)
rhs, rhs_params = self.process_rhs(compiler, connection)
return f"{lhs} & {rhs} = 0", lhs_params + rhs_params
return f"{lhs} & {rhs} = 0", [*lhs_params, *rhs_params]
@models.Field.register_lookup
@@ -27,4 +27,4 @@ class AndNonZero(models.Lookup[int]):
) -> tuple[str, list[str | int]]: # nocoverage # currently only used in migrations
lhs, lhs_params = self.process_lhs(compiler, connection)
rhs, rhs_params = self.process_rhs(compiler, connection)
return f"{lhs} & {rhs} != 0", lhs_params + rhs_params
return f"{lhs} & {rhs} != 0", [*lhs_params, *rhs_params]