mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Fix for holdoff threshold checks (#7795)
- Don't use the "day" portion of date?
This commit is contained in:
parent
6f67fb2c9a
commit
6fd5a9941b
@ -118,7 +118,7 @@ def check_daily_holdoff(task_name: str, n_days: int = 1) -> bool:
|
||||
if last_success:
|
||||
threshold = datetime.now() - timedelta(days=n_days)
|
||||
|
||||
if last_success > threshold:
|
||||
if last_success.date() > threshold.date():
|
||||
logger.info(
|
||||
"Last successful run for '%s' was too recent - skipping task", task_name
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user