From 306725ef92db72440719a2003e48187a0688c56a Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 20 Feb 2022 04:25:17 +0100 Subject: [PATCH] merge satement --- InvenTree/stock/api.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/InvenTree/stock/api.py b/InvenTree/stock/api.py index 9723e01c09..fb1cc5f2ba 100644 --- a/InvenTree/stock/api.py +++ b/InvenTree/stock/api.py @@ -516,9 +516,7 @@ class StockList(generics.ListCreateAPIView): data['location'] = location.pk # An expiry date was *not* specified - try to infer it! - if 'expiry_date' not in data: - - if part.default_expiry > 0: + if 'expiry_date' not in data and part.default_expiry > 0: data['expiry_date'] = datetime.now().date() + timedelta(days=part.default_expiry) # Attempt to extract serial numbers from submitted data