From a2461fbeeada6b6d3ec50d7881d29e0ca2cd4764 Mon Sep 17 00:00:00 2001 From: elpolilla Date: Tue, 4 Nov 2008 14:06:28 +0000 Subject: [PATCH] Wrong attribute assignation fixed again --HG-- extra : convert_revision : svn%3Ab85faa78-f9eb-468e-a121-7cced6da292c%40364 --- scrapy/trunk/scrapy/item/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scrapy/trunk/scrapy/item/models.py b/scrapy/trunk/scrapy/item/models.py index aa58c6f15..00638c977 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 not val is None: + if val or val is False: curr_val = getattr(self, attrname, None) if not curr_val: setattr(self, attrname, val)