aboutsummaryrefslogtreecommitdiff
path: root/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'models.py')
-rw-r--r--models.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/models.py b/models.py
index 56c1845..5de1df2 100644
--- a/models.py
+++ b/models.py
@@ -179,6 +179,8 @@ class CourseManager(Manager):
.prefetch_related("rooms")
elif isinstance(obj, Room):
qs = qs.filter(rooms__in=(obj,), **criteria)
+ else:
+ raise(TypeError, "obj must be a Group or a Room")
return qs.order_by("begin")