1
0
Fork 0

Merge branch 'main' into activitypub-cleanup

This commit is contained in:
Mouse Reeve 2020-11-27 20:13:32 -08:00
commit 86cbb3edbd
8 changed files with 22 additions and 19 deletions

View file

@ -132,14 +132,16 @@ class ImportItem(models.Model):
def date_added(self):
''' when the book was added to this dataset '''
if self.data['Date Added']:
return dateutil.parser.parse(self.data['Date Added'])
return timezone.make_aware(
dateutil.parser.parse(self.data['Date Added']))
return None
@property
def date_read(self):
''' the date a book was completed '''
if self.data['Date Read']:
return dateutil.parser.parse(self.data['Date Read'])
return timezone.make_aware(
dateutil.parser.parse(self.data['Date Read']))
return None
@property

View file

@ -54,7 +54,7 @@ class SiteInvite(models.Model):
def get_passowrd_reset_expiry():
''' give people a limited time to use the link '''
now = datetime.datetime.now()
now = timezone.now()
return now + datetime.timedelta(days=1)