From f25822cd8d99e788ff098ab89e55d3c15b52bfa9 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 1 May 2015 15:50:52 +0530 Subject: [PATCH] fix in patches --- erpnext/patches/v5_0/update_item_description_and_image.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/patches/v5_0/update_item_description_and_image.py b/erpnext/patches/v5_0/update_item_description_and_image.py index 7e61314b7a..6b4705205e 100644 --- a/erpnext/patches/v5_0/update_item_description_and_image.py +++ b/erpnext/patches/v5_0/update_item_description_and_image.py @@ -30,7 +30,8 @@ def execute(): count = 1 for d in records: - if cstr(d.description) == item_details.get(d.item_code).old_description: + if d.item_code and item_details.get(d.item_code) \ + and cstr(d.description) == item_details.get(d.item_code).old_description: image_url = item_details.get(d.item_code).image_url desc = item_details.get(d.item_code).new_description else: