Skip to content

Commit 018166c

Browse files
Prevent username doubling in the owner filter
1 parent 9c75537 commit 018166c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tasks/utils/admfilters.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ def lookups(self, request, model_admin):
2424
if project_id:
2525
qs = qs.filter(project__id__exact=project_id)
2626

27-
excluded_qs = qs.exclude(owner=request.user)
27+
excluded_qs = qs.exclude(
28+
owner=request.user).exclude(co_owner=request.user)
2829
owner_lookups = self.get_owner_lookups(excluded_qs)
2930
if request.user.is_chief:
3031
lookups = [('all', _('All')), *owner_lookups]

0 commit comments

Comments
 (0)