[agri] Disease task creation on new CropCycle fix (#12131)

This commit is contained in:
Ameya Shenoy 2017-12-22 10:58:47 +05:30 committed by Nabin Hait
parent 5807cd8e6f
commit 3909bd4e9f

View File

@ -18,6 +18,11 @@ class CropCycle(Document):
self.row_spacing_uom = crop.row_spacing_uom
if not self.project:
self.project = self.name
disease = []
for detected_disease in self.detected_disease:
disease.append(detected_disease.name)
if disease != []:
self.update_disease(disease)
else:
old_disease, new_disease = [], []
for detected_disease in self.detected_disease: