From a07023656a89631ce954107ee842105ecfdb6fa7 Mon Sep 17 00:00:00 2001 From: Bertrand Chenal Date: Thu, 14 Aug 2008 16:27:33 +0200 Subject: [PATCH] Fix: use max date instead of current date for infinite forecast --- location.py | 2 ++ product.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/location.py b/location.py index b843bcdbc9..e683b2c512 100644 --- a/location.py +++ b/location.py @@ -202,6 +202,8 @@ class OpenProduct(Wizard): context['locations'] = data['ids'] if data['form']['forecast_date']: context['stock_date'] = data['form']['forecast_date'] + else: + context['stock_date'] = datetime.date.max res['context'] = str(context) return res diff --git a/product.py b/product.py index 3a4219bed8..35c43a7856 100644 --- a/product.py +++ b/product.py @@ -273,6 +273,8 @@ class OpenLocation(Wizard): context['product'] = data['id'] if data['form']['forecast_date']: context['stock_date'] = data['form']['forecast_date'] + else: + context['stock_date'] = datetime.date.max res['context'] = str(context) return res