airlog / flavority-api

RESTful API for the tastiest website
0 stars 1 forks source link

AttributeError: 'Comment' object has no attribute 'title' #6

Closed robin92 closed 10 years ago

robin92 commented 10 years ago
1. O co chodzi?

Zmiany w bazie danych spowodowały błędy w metodzie Comment.__repr__.

2. Kroki do reprodukcji
>> import flavority
>> flavority.models.Comment.query.first()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "./flavority/models.py", line 251, in __repr__
    return '<Comment: %r, with text: %r>' % (self.title, self.text)
AttributeError: 'Comment' object has no attribute 'title'
illa commented 10 years ago

Wg mnie poprawne jest to że komentarz nie ma tytułu, więc myślę naprawa powinna polegać nie na dodaniu tego atrybutu ale na usunięciu wszelkich jego użyć.