Skip to content

Commit

Permalink
make sure membership activities are ordered correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
lakridserne committed Jan 14, 2024
1 parent c584d78 commit acb8beb
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 acb8beb

Please sign in to comment.