Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

lookups: Adjust for django-stubs change.

Anders Kaseorg47aa34097b78
diff --git a/zerver/models/lookups.py b/zerver/models/lookups.py
index c059997786b..c5f58f4fea3 100644
--- a/zerver/models/lookups.py
+++ b/zerver/models/lookups.py
@@ -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]