Beispiel #1
0
def update_meeting(meeting_data: MeetingJsonData) -> ResultWithData[str]:
    try:
        meeting = Meeting.get(id=meeting_data.id)
        meeting.date = meeting_data.date
        meeting.last_upload = meeting_data.last_upload
        meeting.lp = meeting_data.lp
        meeting.meeting_no = meeting_data.meeting_no
    except Exception as e:
        return get_result_with_error("Failed to update meeting {0}".format(e))

    return get_result_with_data("")
def get_meeting_for_period(year: int, lp: int,
                           meeting_no: int) -> Optional[Meeting]:
    return Meeting.get(year=year, lp=lp, meeting_no=meeting_no)
def get_meeting_by_id(id: UUID) -> Optional[Meeting]:
    return Meeting.get(id=id)