plone / guillotina

Python AsyncIO data API to manage billions of resources
https://guillotina.readthedocs.io/en/latest/
Other
187 stars 51 forks source link

If no request is provided pg catalog fails #826

Closed jordic closed 4 years ago

jordic commented 4 years ago

If we try to use the catalog on a Command, and we don't provide a mock request... the query catalog fails.. This is the wrong line:

https://github.com/plone/guillotina/blob/master/guillotina/contrib/catalog/pg.py#L613

Not sure why, if it doesn't find a request it resets the current transaction txn. That's wired, because if the exception is shadowed, but the db connection is reset, it will fail later...

Also, seems like, it needs the request, just to serialize full objects? Thought we need to talk a bit about this part.

vangheem commented 4 years ago

That's a bug!