Datenschule / jedeschule-scraper

MIT License
22 stars 15 forks source link

TypeError: 'SchoolPipelineItem' object is not a mapping #66

Closed stefanw closed 3 years ago

stefanw commented 4 years ago

The SchoolPipelineItem is a dataclass which apparently does not support being ** into a dict:

session.query(School).filter_by(id=item.info['id']).update({**item, 'raw': item.item})
TypeError: 'SchoolPipelineItem' object is not a mapping
stefanw commented 4 years ago

Looking at this a bit closer this line should probably be **item.info, right @k-nut ?

k-nut commented 4 years ago

Nice catch. Adressed here: https://github.com/Datenschule/jedeschule-scraper/pull/68 (and I even wrote a test to make up for it 🙏 )

cyroxx commented 3 years ago

Closing this since #68 got already merged.