def get_is_consultant(self, obj):
     user = EmailUser.objects.get(id=self.context.get('user_id'))
     return is_consultant(obj, user)
Ejemplo n.º 2
0
 def get_is_consultant(self, obj):
     user = self.context['request'].user
     # Check if the request user is among the first five delegates in the organisation
     return is_consultant(obj, user)