Example #1
0
 def _inject_long_term_attribute(self, sender, data, **kwargs):
     long_term_room_ids = {
         room.id
         for room, value in Room.find_with_attribute('long-term')
         if value.lower() in ('true', '1', 'yes')
     }
     for room in data:
         room['is_long_term'] = room['id'] in long_term_room_ids