Example #1
0
 def ensureRoomAtLocation(event):
     if event.room is not None and \
        event.location is not None and \
        not nodeIsUnder(event.room, event.location):
         raise Invalid(
             "Room '%s' is not in location '%s'." % \
             (oid2dcTitle(event.room), oid2dcTitle(event.location)))
Example #2
0
 def ensureRoomInBuilding(event):
     if event.room is not None and \
        event.building is not None and \
        not nodeIsUnder(event.room, event.building):
         raise Invalid(
             "Room '%s' is not in building '%s'." % \
             (oid2dcTitle(event.room), oid2dcTitle(event.building)))
Example #3
0
 def ensureBuildingInLocation(event):
     if event.building is not None and \
        event.location is not None and \
        not nodeIsUnder(event.building, event.location):
         raise Invalid(
             "Building '%s' is not in location '%s'." % \
             (oid2dcTitle(event.building), oid2dcTitle(event.location)))