updated tests related to updated permissions

This commit is contained in:
David Kennedy 2025-03-17 15:31:14 -04:00
parent f275245f69
commit 07b1010dd4
No known key found for this signature in database
GPG key ID: 6528A5386E66B96B
2 changed files with 9 additions and 8 deletions

View file

@ -1457,10 +1457,11 @@ class SeniorOfficialAdmin(ListHeaderAdmin):
# Check if user is in OMB analysts group
if request.user.groups.filter(name="omb_analysts_group").exists():
annotated_qs = self.get_annotated_queryset(qs)
return annotated_qs.filter(
converted_federal_type=BranchChoices.EXECUTIVE,
)
# annotated_qs = self.get_annotated_queryset(qs)
# return annotated_qs.filter(
# converted_federal_type=BranchChoices.EXECUTIVE,
# )
return qs.filter(federal_agency__federal_type=BranchChoices.EXECUTIVE)
return qs # Return full queryset if the user doesn't have the restriction