fix: manuelle Lebensmittel in der Liste wieder bearbeiten
Deploy Development / deploy (push) Successful in 1m6s
Build Test / pytest-backend (push) Successful in 9s
Build Test / lint-backend (push) Successful in 0s
Build Test / build-frontend (push) Successful in 22s

Admin-Katalog und Nutzer-Liste oeffnen den Editor statt nur die Lesansicht; PUT gilt fuer zentrale und persoenliche Manuals.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
LarsandCursor committed 2026-09-14 12:55:09 +02:00
1 parent 8b1e1da5d8
commit 9a0767c8ac
9 files changed
+59 -20

No files matched your search

+2 -2
View File
@@ -238,8 +238,8 @@ def get_food_detail(food_id: str, session: dict = Depends(require_auth)):
if not food:
raise HTTPException(404, "Lebensmittel nicht gefunden")
food = dict(food)
editable = food.get("catalog_kind") == "manual_user" and str(food.get("owner_profile_id") or "") == str(pid)
from data_layer.food_visibility import attach_visibility
from data_layer.food_visibility import attach_visibility, same_id
editable = food.get("catalog_kind") == "manual_user" and same_id(food.get("owner_profile_id"), pid)
return attach_visibility(editor_payload_for_food(cur, food, editable=editable))