Add values (if there're any) when initiating items from dicts

https://github.com/scrapy/scrapy/issues/3804
This commit is contained in:
Sortafreel 2019-06-07 01:50:03 +03:00
parent 29bbbaa4dd
commit bd8a10384b
1 changed files with 2 additions and 0 deletions

View File

@ -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):