Skip to content

Commit

Permalink
Remove virtual specific code
Browse files Browse the repository at this point in the history
  • Loading branch information
johanvdw committed Dec 17, 2023
1 parent a7c4469 commit c17780e
Showing 1 changed file with 18 additions and 31 deletions.
49 changes: 18 additions & 31 deletions volunteers/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,37 +144,24 @@ def sync_with_penta(cls):
rooms = day.findall('room')
for room in rooms:
room_name = room.get('name')
if edition.digital_edition:
needs_hosting = False
if room_name.startswith('S'):
# skip import of stands
continue
if room_name[0] in ['L', 'M'] or room_name in ["D.blockchain"]:
needs_hosting = True
events = room.findall('event')
for event in events:
talk = Talk.penta_create_or_update(event, edition, day_date)
if needs_hosting:
Task.create_or_update_from_talk(edition, talk, 'Hosting', [1, 2, 3])
else:
# Lightning talks are done manually since the time slots are so small.
needs_heralding = False
needs_video = False

if room_name in ['Janson', 'K.1.105 (La Fontaine)']:
needs_heralding = True
needs_video = getattr(settings, 'IMPORT_VIDEO_TASKS', True)

events = room.findall('event')
for event in events:
talk = Talk.penta_create_or_update(event, edition, day_date)
######################
# Tasks, if required #
######################
if needs_heralding:
Task.create_or_update_from_talk(edition, talk, 'Heralding', [3, 2, 5])
if needs_video:
Task.create_or_update_from_talk(edition, talk, 'Video', [1, 1, 1])
# Lightning talks are done manually since the time slots are so small.
needs_heralding = False
needs_video = False

if room_name in ['Janson', 'K.1.105 (La Fontaine)']:
needs_heralding = True
needs_video = getattr(settings, 'IMPORT_VIDEO_TASKS', True)

events = room.findall('event')
for event in events:
talk = Talk.penta_create_or_update(event, edition, day_date)
######################
# Tasks, if required #
######################
if needs_heralding:
Task.create_or_update_from_talk(edition, talk, 'Heralding', [3, 2, 5])
if needs_video:
Task.create_or_update_from_talk(edition, talk, 'Video', [1, 1, 1])


"""
Expand Down

0 comments on commit c17780e

Please sign in to comment.