diff --git a/program/services.py b/program/services.py index 166624bd1deb08beffb813c64c5e5f0886ee5b72..690ef5f9ae97cd3d6526b1af10177f6bb0908108 100644 --- a/program/services.py +++ b/program/services.py @@ -632,18 +632,11 @@ def generate_conflicts(timeslots: list[TimeSlot]) -> Conflicts: projected = [] solutions = {} - # Cycle each timeslot for timeslot in timeslots: - # Contains collisions collisions = [] - - # Contains possible solutions solution_choices = set() - - # Get collisions for each timeslot colliding_timeslots = list(get_colliding_timeslots(timeslot).order_by("start")) - # Add the projected timeslot projected_entry = { "hash": timeslot.hash, "start": str(timeslot.start), @@ -651,7 +644,6 @@ def generate_conflicts(timeslots: list[TimeSlot]) -> Conflicts: } for existing in colliding_timeslots: - # Add the collision collision = { "timeslot_id": existing.id, "start": str(existing.start), @@ -663,7 +655,6 @@ def generate_conflicts(timeslots: list[TimeSlot]) -> Conflicts: "memo": existing.memo, } - # Get note try: note = Note.objects.get(timeslot=existing.id) collision["note_id"] = note.pk @@ -672,8 +663,6 @@ def generate_conflicts(timeslots: list[TimeSlot]) -> Conflicts: collisions.append(collision) - """Determine acceptable solutions""" - if len(colliding_timeslots) > 1: # If there is more than one collision: Only these two are supported at the moment solution_choices.add("theirs")