Skip to content

Scrapy, a fast high-level web crawling & scraping framework for Python.

Fixed bad checking while setting attributes

elpolilla5bad79836f93
diff --git a/scrapy/trunk/scrapy/item/models.py b/scrapy/trunk/scrapy/item/models.py
index e4187c1e2..aa58c6f15 100644
--- a/scrapy/trunk/scrapy/item/models.py
+++ b/scrapy/trunk/scrapy/item/models.py
@@ -24,7 +24,7 @@ class ScrapedItem(object):
def attribute(self, attrname, value, override=False, add=False, debug=False):
val = self._adaptors_dict.execute(attrname, value, debug)
- if val:
+ if not val is None:
curr_val = getattr(self, attrname, None)
if not curr_val:
setattr(self, attrname, val)