Update buying_controller.py

This commit is contained in:
Nabin Hait 2019-10-21 13:40:00 +05:30 committed by GitHub
parent 19070621af
commit dd893254be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -696,7 +696,9 @@ class BuyingController(StockController):
if not self.get("items"):
return
self.schedule_date = min([d.schedule_date for d in self.get("items")])
earliest_schedule_date = min([d.schedule_date for d in self.get("items")])
if earliest_schedule_date:
self.schedule_date = earliest_schedule_date
if self.schedule_date:
for d in self.get('items'):