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)))
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)))
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)))