Datenschule/jedeschule-scraper

TypeError: 'SchoolPipelineItem' object is not a mapping

Closed this issue · 3 comments

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

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

k-nut commented

Nice catch. Adressed here: #68 (and I even wrote a test to make up for it 🙏 )

Closing this since #68 got already merged.