e2nIEE / pandahub

A data hub for pandapower and pandapipes networks based on MongoDB.
Other
12 stars 12 forks source link

Cosmos-DB compatability #25

Closed jthurner closed 1 year ago

jthurner commented 1 year ago

Azure Cosmos DB for MongoDB neither supports creating unique index on non-empty collections nor collation, which leads to exceptions in fastapi-users.

Introduce a setting COSMOSDB_COMPAT which, when set, replaces MongoDBUserDatabase with a subclass with the incompatible function calls patched out:

Skipping the collation means that email addressess (usernames) are not case-insensitive anymore - i.e. my@user.de and My@user.de are treated as different accounts.