Skip to content

Commit

Permalink
Merge pull request #97 from Danyc0/fix-pretalx-import
Browse files Browse the repository at this point in the history
Fix bug where old tasks could silently be moved to the current edition
  • Loading branch information
johanvdw authored Jan 27, 2025
2 parents d0505a4 + 99f8c02 commit b29cb1c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions volunteers/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ def link(self):
@classmethod
def penta_create_or_update(cls, xml, edition, day_date):
event_id = xml.get('id')
talks = cls.objects.filter(ext_id=event_id)
talks = cls.objects.filter(ext_id=event_id, edition=edition)
if len(talks):
talk = talks[0]
else:
Expand Down Expand Up @@ -383,7 +383,7 @@ def link(self):
# ideal, min, max
@classmethod
def create_or_update_from_talk(cls, edition, talk, task_type, volunteers):
tasks = cls.objects.filter(talk=talk, template__name=task_type)
tasks = cls.objects.filter(talk=talk, template__name=task_type, edition=edition)
templates = TaskTemplate.objects.filter(name=task_type)
if len(templates):
template = templates[0]
Expand Down

0 comments on commit b29cb1c

Please sign in to comment.