You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
defget_queryset(self):
queryset=super(ClassViewSet, self).get_queryset()
ifself.request.user.is_stafforself.request.user.is_superuser:
returnquerysetcourse_id=self.request.query_params.get('course')
ifcourse_id:
try:
role=self.request.user.teaching_courses.get(course__id=course_id).roleexceptObjectDoesNotExist:
role=''# if user is not coordinator or admin, only show his classesifnotroleorrole=='assistant':
queryset=queryset.filter(assistant=self.request.user)
returnqueryset
The text was updated successfully, but these errors were encountered:
Problema aparece no get_queryset da classe
timtec/core/views.py
The text was updated successfully, but these errors were encountered: