9 Commits (453869d71d04b2bc454126e60515aa09a7bcb8b9)

Author SHA1 Message Date
Tom Hacohen 2e21fe4994 Django db cleanup: explicitly add it to dependencies.
We can't really add it manually, because some of the deps are auto included as
parameters. These were not being decorated which in turn meeant issues.
4 years ago
Tom Hacohen 5b8f667e55 Cleanup django db connections before every request and every dependency.
This is instead of the commit we reverted in the previous commit.
The problem is that django keeps the connection per thread and it relies
on django itself to clean them up before/after connections.
We can't do this, because django is unaware of fastapi, so we have to
manage this ourselves.

The easiest way is to call it at the beginning of evenry route and every dep.
We need to do it for each because unfortunately fastapi may send them to
different worker threads.
4 years ago
Tom Hacohen 62eb46ec4e msgpack route: use the encode/decode functions from the utils module. 4 years ago
Tom Hacohen 794b5f3983 Fix many type errors. 4 years ago
Tom Hacohen 80d69a5663 Fix collection list and how we return API responses. 4 years ago
Tom Hacohen 15988235f2 Exclude unset fields so fix removedMemberships return value. 4 years ago
Tom Hacohen 7f90edc511 MsgPack: handle no content. 4 years ago
Tal Leibman 25cb4fec0c msgpack.py: allow pydantic BaseModel in content 4 years ago
Tal Leibman c1534f6587 first commit 4 years ago