def get_summary(self, length=255): if length > 255: return summarize(body=self.desc, length=length, prefer_long=True, fallback='') else: return summarize(body=self.desc, length=length, fallback='')
def get_summary(self, length=255): if length > 255: return summarize(body=self.desc, summary=self.summary, length=length, prefer_long=True) else: return summarize(body=self.desc, summary=self.summary, length=length)
def summary_search(self): if not self.notes and self.event.notes: fallback = self.event.get_summary(255) else: fallback = None return summarize(body=self.notes, length=255, fallback=fallback)