added SLot.rooms property
This commit is contained in:
parent
17869c7c7c
commit
f30dce6a61
1 changed files with 4 additions and 0 deletions
|
@ -74,6 +74,10 @@ class Slot(models.Model):
|
||||||
except ObjectDoesNotExist:
|
except ObjectDoesNotExist:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
@property
|
||||||
|
def rooms(self):
|
||||||
|
return Room.objects.filter(pk__in=self.slotroom_set.values("room"))
|
||||||
|
|
||||||
|
|
||||||
class SlotRoom(models.Model):
|
class SlotRoom(models.Model):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in a new issue