fix: Startup-Crash - doppelt definierte Calendar.owner-Relation entfernt

User.calendars hat bereits backref='owner', mein zusaetzlich
hinzugefuegtes Calendar.owner kollidierte damit und SQLAlchemy
weigerte sich, die Mappers zu initialisieren ("Error creating
backref 'owner'..."). Damit waren alle Auth-Endpoints tot.

Jetzt nur noch Kommentar, die backref uebernimmt die Aufgabe.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Stefan Hacker
2026-04-12 13:00:00 +02:00
parent a143325bbe
commit c73be6fac5
+1 -1
View File
@@ -21,7 +21,7 @@ class Calendar(db.Model):
cascade='all, delete-orphan')
shares = db.relationship('CalendarShare', backref='calendar', lazy='dynamic',
cascade='all, delete-orphan')
owner = db.relationship('User', foreign_keys=[owner_id])
# Note: `owner` is auto-created as a backref by User.calendars relationship
def to_dict(self):
return {