Skip to content

Commit

Permalink
bug: remarket issue (#5017)
Browse files Browse the repository at this point in the history
  • Loading branch information
thelostone-mc authored Aug 14, 2019
1 parent 079e0d4 commit 106146e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/dashboard/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1577,9 +1577,9 @@ def helper_handle_remarket_trigger(request, bounty):
if is_staff or is_funder:
remarketed_count = bounty.remarketed_count
if remarketed_count < 2:
one_hour_after_remarketing = bounty.last_remarketed + timezone.timedelta(hours=1)
now = timezone.now()
if now > one_hour_after_remarketing:
one_hour_after_remarketing = bounty.last_remarketed + timezone.timedelta(hours=1) if bounty.last_remarketed else now
if now >= one_hour_after_remarketing:
bounty.remarketed_count = remarketed_count + 1
bounty.last_remarketed = now
bounty.save()
Expand Down

0 comments on commit 106146e

Please sign in to comment.