fix: don't print the full author/user object when calling Quote().to_pretty()

This commit is contained in:
cătălin 2025-02-13 10:55:00 +01:00
commit e428cd0672
No known key found for this signature in database
3 changed files with 5 additions and 5 deletions

View file

@ -80,7 +80,7 @@ class Quote(BaseModel):
last_updated_at: datetime.datetime
def as_pretty(self) -> str:
return f"«{self.quote}» - {self.author}"
return f"«{self.quote}» - {self.author.user}"
def as_pretty_saved(self):
return f"He añadido la cita «{self.quote}» de {self.author}"
return f"He añadido la cita «{self.quote}» de {self.author.user}"