dbca-wa / wastd

Western Australian Sea Turtle and Strandings Database

Home Page:https://dbca-wa.github.io/wastd/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

User select2 dropdown should exclude inactive users

florianm opened this issue · comments

Problem

Admin forms show inactive users in dropdowns. Exclude these.

Reproducible example

  • Step 1: Go to
  • Step 2: Do

Need to restrict choices in wastd.observations.admin:977

https://django.fun/docs/django_select2/en/7.4.2/_modules/django_select2/forms/#ModelSelect2Mixin.get_queryset doesn't seem to be working here - still getting users.objects.all() instead of .filter(is_active=True)