mirror of
https://github.com/lemeow125/StudE-Backend.git
synced 2024-11-17 06:19:24 +08:00
Restrict access to StudyGroupListNearView if student status is inactive to prevent errors
This commit is contained in:
parent
3124c3b6be
commit
268069eeb4
1 changed files with 3 additions and 0 deletions
|
@ -72,6 +72,9 @@ class StudyGroupListNearView(generics.ListAPIView):
|
||||||
"You must be a student to view study groups"
|
"You must be a student to view study groups"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if user_status.active is False:
|
||||||
|
raise exceptions.ValidationError("Student Status is not active")
|
||||||
|
|
||||||
# Get the user's course
|
# Get the user's course
|
||||||
user_course = user.course
|
user_course = user.course
|
||||||
print(user_course)
|
print(user_course)
|
||||||
|
|
Loading…
Reference in a new issue