Mehrere Auswahlen in einem Objekt speichern

- Neues JSON-Feld 'selections' in Directus objects-Collection
- Alle Auswahlen (bbox/polygon) landen in einem einzigen Objekt
- Erste Auswahl bleibt weiterhin in bbox/polygon für Kompatibilität
- GET-Proxy liefert selections-Feld mit aus

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-25 21:23:22 +02:00
parent 8219a5445c
commit 807c733770
4 changed files with 14 additions and 15 deletions

2
app.py
View File

@@ -79,7 +79,7 @@ def directus_objects():
token = request.headers.get("Authorization", "")
if request.method == "GET":
picture_id = request.args.get("picture_id", "")
fields = "id,bbox,polygon,user_notes,parent,status,picture"
fields = "id,bbox,polygon,selections,user_notes,parent,status,picture"
path = f"/items/objects?filter[picture][_eq]={picture_id}&fields={fields}&sort=date_created"
data, status = _directus("GET", path, token)
return jsonify(data), status