Skip to content

Commit 0d4fffc

Browse files
authored
fix(logs): add limits to attributes/values queries (#42477)
1 parent 4adfb70 commit 0d4fffc

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

products/logs/backend/api.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ def attributes(self, request: Request, *args, **kwargs) -> Response:
189189
AND attribute_key LIKE %(search)s
190190
GROUP BY team_id, attribute_key
191191
ORDER BY sum(attribute_count) desc, attribute_key asc
192+
LIMIT 50
192193
)
193194
""",
194195
args={"search": f"%{search}%", "team_id": self.team.id},
@@ -228,6 +229,7 @@ def values(self, request: Request, *args, **kwargs) -> Response:
228229
AND attribute_value LIKE %(search)s
229230
GROUP BY team_id, attribute_value
230231
ORDER BY sum(attribute_count) desc, attribute_value asc
232+
LIMIT 50
231233
)
232234
""",
233235
args={"key": key, "search": f"%{search}%", "team_id": self.team.id},

0 commit comments

Comments
 (0)