get attribute with get method
diff --git a/erpnext/stock/doctype/item/item.py b/erpnext/stock/doctype/item/item.py
index 4b4f15b..bf8eaba 100644
--- a/erpnext/stock/doctype/item/item.py
+++ b/erpnext/stock/doctype/item/item.py
@@ -57,7 +57,7 @@
 		if not self.description:
 			self.description = self.item_name
 
-		if self.is_sales_item and not self.is_item_from_hub:
+		if self.is_sales_item and not self.get('is_item_from_hub'):
 			self.publish_in_hub = 1
 
 	def after_insert(self):