Skip to content

Commit

Permalink
Also render image day before the start / after the end.
Browse files Browse the repository at this point in the history
Ensures that the image will be rendered in its final form.
  • Loading branch information
soerface committed Nov 9, 2024
1 parent ec5c4ed commit d954a02
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/tasks/voucher.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import logging
import re
from datetime import datetime
from datetime import datetime, timedelta
from pathlib import Path
import random

Expand Down Expand Up @@ -552,10 +552,10 @@ def update_history_image(client: DiscourseStorageClient) -> None:
else:
return

if start_date > now.date():
if start_date > (now.date() - timedelta(days=1)):
return

if end_date < now.date():
if end_date < (now.date() + timedelta(days=1)):
return

if ts := phase_range.get("exhausted_at"):
Expand Down

0 comments on commit d954a02

Please sign in to comment.