def load_from_db(self): self.entity_collection = None try: data = Slot.get(self.id) if isinstance(data, Slot): self.entity_collection = data except: pass