Skip to content

Commit

Permalink
Merge pull request #3544 from joaquingx/fix-item-pipeline-x
Browse files Browse the repository at this point in the history
Fix item-pipeline example
  • Loading branch information
dangra committed Jan 28, 2019
2 parents c4f5760 + e1f8b55 commit b5026b8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/topics/item-pipeline.rst
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ contain a price::
vat_factor = 1.15

def process_item(self, item, spider):
if item['price']:
if item['price_excludes_vat']:
if item.get('price'):
if item.get('price_excludes_vat'):
item['price'] = item['price'] * self.vat_factor
return item
else:
Expand Down

0 comments on commit b5026b8

Please sign in to comment.