Read the API key list before the next query replaces it.
Deploy Development / deploy (push) Successful in 54s
Test Suite / pytest-backend (push) Failing after 29s
Test Suite / lint-backend (push) Successful in 1s
Test Suite / build-frontend (push) Successful in 23s
Test Suite / k6 /health Baseline (push) Successful in 35s
Test Suite / playwright-tests (push) Failing after 7m41s

The exercise release screen asked which keys match and then looked up club roles on the same cursor. The key rows were discarded, so a valid key looked missing.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
LarsandCursor committed 2026-11-23 14:34:15 +01:00
1 parent b824115e9b
commit 4b33b17b2d
3 files changed
+56 -5

No files matched your search

+2 -2
View File
@@ -1538,6 +1538,8 @@ def release_keys_for_exercise(cur, exercise: dict, profile_id: int, role: str) -
return [], denial
if vis == "club" and exercise.get("club_id") is not None and not _api_enabled(cur, int(exercise["club_id"])):
return [], "Die API-Schnittstelle ist für diesen Verein nicht freigegeben."
admin_ids = _club_ids_with_role(cur, profile_id, "club_admin")
member_ids = _club_ids_with_role(cur, profile_id, None)
cur.execute(
"""
SELECT k.id, k.label, k.context_kind, k.context_club_id, k.context_profile_id, k.club_ids,
@@ -1552,8 +1554,6 @@ def release_keys_for_exercise(cur, exercise: dict, profile_id: int, role: str) -
""",
(vis,),
)
admin_ids = _club_ids_with_role(cur, profile_id, "club_admin")
member_ids = _club_ids_with_role(cur, profile_id, None)
keys = []
for row in _rows(cur):
item = r2d(row)