feriennet.models.group_invite
Classes
Module Contents
- class feriennet.models.group_invite.GroupInvite(session: sqlalchemy.orm.Session, group_code: str, username: str | None)[source]
-
- classmethod create(session: sqlalchemy.orm.Session, username: str | None) Self [source]
Creates a new group invite with a code that is not yet used.
- property occasion: onegov.activity.models.Occasion[source]
Looks up the occasion linked to this group invite.
Technically it would be possible that a group code points to multiple occasions, but that would be an error. If that happens, an exception will be thrown.
- property attendees: tuple[tuple[onegov.activity.models.Attendee, onegov.activity.models.Booking], Ellipsis][source]
Returns the attendees linked to this invite.
- prospects(username: str) Iterator[tuple[Attendee, Booking | None]] [source]
Returns the attendees associated with the given users that are not yet part of the group.
The result is a list of tuples with the first element being the attendee and the second element being the booking for the linked occasion, if such a booking already exists (otherwise None).