From 8badb0cb99fa25a73b9c4bf3b96be2e5db74efec Mon Sep 17 00:00:00 2001 From: Clinton Roy Date: Sun, 13 Oct 2019 15:52:51 +1100 Subject: [PATCH] first stab at making a room slot, still not quite there, think i have to make a separate slot for each time slot --- pinaxcon/registrasion/management/commands/update_schedule.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pinaxcon/registrasion/management/commands/update_schedule.py b/pinaxcon/registrasion/management/commands/update_schedule.py index 50ef165e..20e23210 100644 --- a/pinaxcon/registrasion/management/commands/update_schedule.py +++ b/pinaxcon/registrasion/management/commands/update_schedule.py @@ -2,7 +2,7 @@ from django.core.management.base import BaseCommand from symposion.conference.models import Section, current_conference -from symposion.schedule.models import (Day, Presentation, Room, SlotKind, Schedule, Slot) +from symposion.schedule.models import (Day, Presentation, Room, SlotKind, Schedule, Slot, SlotRoom) from symposion.proposals.models import ProposalBase @@ -109,6 +109,7 @@ class Command(BaseCommand): for room_name in room_names: room, _created = Room.objects.get_or_create( schedule=schedule, name=room_name, order=used_rooms.index(room_name)) + rooms[room_name] = room slotkinds = {} for slotkind_name in slotkind_names: @@ -141,6 +142,8 @@ class Command(BaseCommand): slot = slots[(date, kind_name, start_time, end_time)] + slotroom = SlotRoom.objects.get_or_create(slot=slot, room=rooms[room]) + proposal = ProposalBase.objects.filter(pk=talk_id).first() assert proposal, f"Could not find proposal {talk_id}"