Skip to content

Commit

Permalink
💫 [IMPR] Fix objects deletions in OutdoorParser (refs #3569)
Browse files Browse the repository at this point in the history
  • Loading branch information
Chatewgne committed Feb 23, 2024
1 parent daceb7d commit 471ba79
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions geotrek/outdoor/parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ def end(self):
continue
child_site.parent = parent_site
child_site.save()
super().end()


class GeotrekCourseParser(GeotrekOutdoorParser):
Expand Down Expand Up @@ -250,5 +251,6 @@ def end(self):
self.add_warning(f"Trying to retrieve missing child Course (UUID: {child}) for parent Course (UUID: {parent})")
continue
OrderedCourseChild.objects.update_or_create(parent=parent_course,
child=child_course,
defaults={'order': i})
child=child_course,
defaults={'order': i})
super().end()

0 comments on commit 471ba79

Please sign in to comment.