Skip to content

Commit

Permalink
Merge pull request #995 from lakridserne/bug/membership_activities_no…
Browse files Browse the repository at this point in the history
…t_ordered_correctly

Make sure membership activities are ordered correctly
  • Loading branch information
lakridserne authored Jan 14, 2024
2 parents 891a1cf + acb8beb commit 3136669
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions members/management/commands/create_membership_activities.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ def handle(self, *args, **options):

localDepartments = str.join(
", ",
Department.objects.filter(union=curUnion).values_list(
Department.objects.filter(union=curUnion, closed_dtm=None).values_list(
"name", flat=True
),
)

try:
department = Department.objects.get(name=localDepartments)
department = Department.objects.get(name=curUnion.name)
except Exception:
print("Using backup main department at %s" % (curUnion.name))
pass
Expand Down
2 changes: 1 addition & 1 deletion members/views/Membership.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def Membership(request):
current_activities = Activity.objects.filter(
signup_closing__gte=timezone.now(),
activitytype__in=["FORENINGSMEDLEMSKAB"],
).order_by("department__address__region", "-name", "start_date")
).order_by("department__union__address__region", "name", "start_date")

family = None
participating = None
Expand Down

0 comments on commit 3136669

Please sign in to comment.