[paperwork] Add explicit backend
to User.with_perms call
This commit is contained in:
parent
5ea485abf0
commit
6fad8d534e
@ -90,7 +90,11 @@ def admin_email(ordered_queryset):
|
|||||||
to=(
|
to=(
|
||||||
get_user_model()
|
get_user_model()
|
||||||
.objects.with_perm(
|
.objects.with_perm(
|
||||||
"paperwork.receive_certification_emails", include_superusers=False
|
"paperwork.receive_certification_emails",
|
||||||
|
include_superusers=False,
|
||||||
|
# TODO: backend should not be hardcoded
|
||||||
|
# TODO: LDAPBackend does not support with_perm() directly
|
||||||
|
backend="django.contrib.auth.backends.ModelBackend",
|
||||||
)
|
)
|
||||||
.values_list("email", flat=True)
|
.values_list("email", flat=True)
|
||||||
),
|
),
|
||||||
|
Loading…
Reference in New Issue
Block a user