Commit 2bdd9fbd authored by Sébastiaan Versteeg's avatar Sébastiaan Versteeg
Browse files

Merge branch '484-remove-duplicate-members-registration-admin' into 'master'

List each member only once in Registration admin

Closes #484

See merge request !556
parents 94cbc4be 296e90a7
......@@ -182,4 +182,6 @@ class RegistrationAdmin(DoNextModelAdmin):
if request.GET.get('event_pk'):
kwargs['queryset'] = models.Event.objects.filter(
elif == 'member':
kwargs['queryset'] = Member.active_members.all()
return super().formfield_for_foreignkey(db_field, request, **kwargs)
......@@ -24,7 +24,8 @@ class ActiveMemberManager(models.Manager):
return (super().get_queryset()
.filter(Q(user__membership__until__isnull=True) |
def with_birthdays_in_range(self, from_date, to_date):
queryset = self.get_queryset().filter(birthday__lte=to_date)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment