Skip to content

Commit

Permalink
Add values (if there're any) when initiating items from dicts
Browse files Browse the repository at this point in the history
  • Loading branch information
sortafreel authored and Júlio César Batista committed Apr 17, 2020
1 parent 6c66f65 commit 4a9cba7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scrapy/loader/__init__.py
Expand Up @@ -35,6 +35,8 @@ def __init__(self, item=None, selector=None, response=None, parent=None, **conte
self.parent = parent
self._local_item = context['item'] = item
self._local_values = defaultdict(list)
for field_name, value in item.items():
self.add_value(field_name, value)

@property
def _values(self):
Expand Down

0 comments on commit 4a9cba7

Please sign in to comment.