From 19b1c84fdcf4b66a3b7d20a4c182adc3fef1c4ed Mon Sep 17 00:00:00 2001
From: fheinrich <fheinrich@techfak.uni-bielefeld.de>
Date: Tue, 19 Mar 2024 17:04:25 +0100
Subject: [PATCH] If order has no time limit: duration=1 year, max-now was too
 much

---
 cooperative_cuisine/orders.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cooperative_cuisine/orders.py b/cooperative_cuisine/orders.py
index 58db96b6..910c44b0 100644
--- a/cooperative_cuisine/orders.py
+++ b/cooperative_cuisine/orders.py
@@ -473,7 +473,7 @@ class RandomOrderGeneration(OrderGeneration):
         orders = []
         for meal in meals:
             if no_time_limit:
-                duration = datetime.max - now
+                duration = timedelta(days=365)
             else:
                 if isinstance(self.kwargs.order_duration_random_func["func"], str):
                     seconds = getattr(
-- 
GitLab