Commit 240dfe84 authored by Patrick's avatar Patrick

Use exists() instead of first() is not None

parent c4be8a86
......@@ -29,7 +29,7 @@ def who_is_who_view(request):
)
is_coordinator = request.user.is_superuser or request.user.is_staff or Staff.objects.filter(
customer_responsible_id=request.user.customer.id, is_coordinator=True, is_active=True
).order_by('?').first() is not None
).order_by('?').exists()
return render(
request,
"repanier/who_is_who.html",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment