Skip to content

Commit

Permalink
fixed PastMeetings finishing
Browse files Browse the repository at this point in the history
  • Loading branch information
simon-the-shark committed Nov 10, 2020
1 parent 8973c20 commit 7a163a9
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions que/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,9 @@ def callback(request):
def next_view(request):
finished_ticket = QueueTicket.objects.first()
if finished_ticket is not None:
finished_meeting = PastMeeting.objects.update(
teacher=AuthorizedTeamsUser.objects.get(
principal_name=request.session["userPrincipalName"]
),
student=finished_ticket.user,
finished_at=timezone.now(),
)
PastMeeting.objects.filter(finished_at__isnull=True,
teacher__principal_name=request.session["userPrincipalName"],
student=finished_ticket.user).update(finished_at=timezone.now())
finished_ticket.delete()
now_starting_meeting = QueueTicket.objects.first()
if now_starting_meeting is not None:
Expand Down

0 comments on commit 7a163a9

Please sign in to comment.