forked from mirrors/bookwyrm
Only use added_date as start_date for books being read right now.
This commit is contained in:
parent
60dabe442e
commit
2006b2fbce
1 changed files with 8 additions and 6 deletions
|
@ -111,12 +111,14 @@ class ImportItem(models.Model):
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def reads(self):
|
def reads(self):
|
||||||
return [ReadThrough(
|
if (self.shelf == 'reading'
|
||||||
# date_added isn't the start date, but maybe better than nothing.
|
and self.date_added and not self.date_read):
|
||||||
start_date=self.date_added,
|
return [ReadThrough(start_date=self.date_added)]
|
||||||
finish_date=self.date_read,
|
if self.date_read:
|
||||||
pages_read=None,
|
return [ReadThrough(
|
||||||
)]
|
finish_date=self.date_read,
|
||||||
|
)]
|
||||||
|
return []
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return "<GoodreadsItem {!r}>".format(self.data['Title'])
|
return "<GoodreadsItem {!r}>".format(self.data['Title'])
|
||||||
|
|
Loading…
Reference in a new issue