I recently upgraded to the latest version of sqlalchemy, and some of my code no longer works. I find it difficult to find how to fix this and use my hand.
Previously, the request appeared as follows.
self.db.query(Drive).filter(Drive.package_id==package.package_id)\ .filter(Drive.wipe_end!=None).sum(Drive.wipe_end - Drive.wipe_start)
this worked before getting the sum of some durations, but now I get the following error:
'Query' object has no attribute 'sum'
Any googling I receive receives information that is several years old.
python sqlalchemy
Rhinosaurus
source share