mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-31 13:15:43 +00:00 
			
		
		
		
	Fix for holdoff threshold checks (#7795)
- Don't use the "day" portion of date?
This commit is contained in:
		| @@ -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 | ||||
|             ) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user