filter employees by country for BO
This commit is contained in:
parent
0104400dbd
commit
c8d2884a48
|
|
@ -608,6 +608,12 @@ class EmployeeListCreateView(generics.ListCreateAPIView):
|
||||||
IsEstablishmentAdministrator,
|
IsEstablishmentAdministrator,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def get_queryset(self):
|
||||||
|
qs = super().get_queryset()
|
||||||
|
if self.request.country_code:
|
||||||
|
qs = qs.filter(establishments__address__city__country__code=self.request.country_code)
|
||||||
|
return qs
|
||||||
|
|
||||||
|
|
||||||
class EmployeesListSearchViews(generics.ListAPIView):
|
class EmployeesListSearchViews(generics.ListAPIView):
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user