diff options
-rw-r--r-- | models.py | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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") |