Skip to content
This repository has been archived by the owner on Nov 28, 2022. It is now read-only.

Commit

Permalink
Merge branch 'release/v0.8.11'
Browse files Browse the repository at this point in the history
  • Loading branch information
indietyp committed Jun 26, 2018
2 parents 39fa08b + b6be414 commit 24bc129
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ def sourceban(self):

m.created_at = timezone.make_aware(datetime.datetime.fromtimestamp(raw['created']))
b.reason = raw['reason']
b.length = datetime.timedelta(seconds=raw['length']) if raw['length'] > 0 else None
b.length = datetime.timedelta(seconds=raw['length']) if raw['length'] > 0 and raw['length'] < 31540000 else None
b.resolved = False
if raw['created'] + raw['length'] < self.now.timestamp() and raw['length'] > 0:
b.resolved = True
Expand Down Expand Up @@ -286,7 +286,7 @@ def sourceban(self):

m.created_at = timezone.make_aware(datetime.datetime.fromtimestamp(raw['created']))
m.reason = raw['reason']
m.length = datetime.timedelta(seconds=raw['length']) if raw['length'] > 0 else None
m.length = datetime.timedelta(seconds=raw['length']) if raw['length'] > 0 and raw['length'] < 31540000 else None
m.is_muted = True if raw['type'] == 1 else False
m.is_gagged = True if raw['type'] == 2 else False

Expand Down

0 comments on commit 24bc129

Please sign in to comment.