[minor] try block in serial no status patch
diff --git a/patches/october_2013/p01_fix_serial_no_status.py b/patches/october_2013/p01_fix_serial_no_status.py
index 0bfc400..4d0dc4b 100644
--- a/patches/october_2013/p01_fix_serial_no_status.py
+++ b/patches/october_2013/p01_fix_serial_no_status.py
@@ -9,10 +9,13 @@
serial_nos = webnotes.conn.sql("""select name from `tabSerial No` where status!='Not in Use'
and docstatus=0""")
for sr in serial_nos:
- sr_bean = webnotes.bean("Serial No", sr[0])
- sr_bean.make_controller().via_stock_ledger = True
- sr_bean.run_method("validate")
- sr_bean.save()
+ try:
+ sr_bean = webnotes.bean("Serial No", sr[0])
+ sr_bean.make_controller().via_stock_ledger = True
+ sr_bean.run_method("validate")
+ sr_bean.save()
+ except:
+ pass
webnotes.conn.sql("""update `tabSerial No` set warehouse='' where status in
('Delivered', 'Purchase Returned')""")
\ No newline at end of file