Replaced doc, doc.fields frappe/frappe#478
diff --git a/erpnext/utilities/cleanup_data.py b/erpnext/utilities/cleanup_data.py
index c6a78c3..328eed1 100644
--- a/erpnext/utilities/cleanup_data.py
+++ b/erpnext/utilities/cleanup_data.py
@@ -157,8 +157,8 @@
 	from frappe.model.code import get_obj
 	gd = get_obj('Global Defaults', 'Global Defaults')
 	for d in flds:
-		gd.doc.fields[d] = flds[d]
-	gd.doc.save()
+		gd.set(d, flds[d])
+	gd.save()
 	
 	frappe.clear_cache()