File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -1337,7 +1337,13 @@ def get_queryset(self):
1337
1337
name__iexact = "IFRC Admins" ,
1338
1338
user = OuterRef ("pk" ),
1339
1339
)
1340
- )
1340
+ ),
1341
+ is_local_unit_global_validator = models .Exists (
1342
+ Group .objects .filter (
1343
+ name__iexact = "Local Unit Global Validators" ,
1344
+ user = OuterRef ("pk" ),
1345
+ )
1346
+ ),
1341
1347
)
1342
1348
.filter (is_active = True )
1343
1349
)
Original file line number Diff line number Diff line change @@ -1647,7 +1647,9 @@ class Meta:
1647
1647
class UserSerializer (ModelSerializer ):
1648
1648
profile = ProfileSerializer ()
1649
1649
subscription = MiniSubscriptionSerializer (many = True )
1650
+ # NOTE: This field is annotated in the viewset
1650
1651
is_ifrc_admin = serializers .BooleanField (read_only = True )
1652
+ is_local_unit_global_validator = serializers .BooleanField (read_only = True )
1651
1653
1652
1654
class Meta :
1653
1655
model = User
@@ -1661,6 +1663,7 @@ class Meta:
1661
1663
"subscription" ,
1662
1664
"is_superuser" ,
1663
1665
"is_ifrc_admin" ,
1666
+ "is_local_unit_global_validator" ,
1664
1667
)
1665
1668
1666
1669
def create (self , _ ):
You can’t perform that action at this time.
0 commit comments