From a94918a8ed094eea7f07a9487d0eece62513b75c Mon Sep 17 00:00:00 2001 From: Tanner Collin Date: Tue, 23 May 2023 03:10:06 +0000 Subject: [PATCH] Allow self-registration on meetings and cleans --- apiserver/apiserver/api/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apiserver/apiserver/api/views.py b/apiserver/apiserver/api/views.py index 5fbe3f9..76af5a2 100644 --- a/apiserver/apiserver/api/views.py +++ b/apiserver/apiserver/api/views.py @@ -456,8 +456,9 @@ class TrainingViewSet(Base, Retrieve, Create, Update): member = get_object_or_404(models.Member, id=data['member_id']) user = member.user + course_id = session.course.id - if user == session.instructor: + if course_id not in [317, 273, 413] and user == session.instructor: msg = 'Self-register trickery detected:\n' + str(data.dict()) utils.alert_tanner(msg) raise exceptions.ValidationError(dict(non_field_errors='Can\'t register the instructor. Don\'t try to trick the portal.'))