fastapi-vue
fastapi-vue copied to clipboard
Notes class in Database models refers to an invalid attribute
https://github.com/testdrivenio/fastapi-vue/blob/master/services/backend/src/database/models.py#L22
Currently: return f"{self.title}, {self.author_id} on {self.created_at}"
However, the attribute author_id does not exist.
Perhaps it should be this instead?
return f"{self.title}, {self.author}, {self.id} on {self.created_at}"
@kmcquade according to the tortoise docs, using {FK_name}_id should return the id of the related model.
So it's not an issue, {self.author_id} with return the id of the related author.