merge satement

This commit is contained in:
Matthias 2022-02-20 04:25:17 +01:00
parent 1ff6988ffd
commit 306725ef92
No known key found for this signature in database
GPG Key ID: F50EF5741D33E076

View File

@ -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