mirror of https://github.com/scrapy/scrapy.git
Add values (if there're any) when initiating items from dicts
https://github.com/scrapy/scrapy/issues/3804
This commit is contained in:
parent
29bbbaa4dd
commit
bd8a10384b
|
|
@ -35,6 +35,8 @@ class ItemLoader(object):
|
|||
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):
|
||||
|
|
|
|||
Loading…
Reference in New Issue