mirror of https://github.com/scrapy/scrapy.git
Wrong attribute assignation fixed again
--HG-- extra : convert_revision : svn%3Ab85faa78-f9eb-468e-a121-7cced6da292c%40364
This commit is contained in:
parent
224d3c5185
commit
a2461fbeea
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue