def initialize_db(cls):
cls.db = Database().instance.db
+ @classmethod
+ def get_wim_account_with_id(cls, wim_account_id):
+ if not cls.db:
+ cls.initialize_db()
+ if wim_account_id in cls.db_wims:
+ return cls.db_wims[wim_account_id]
+ db_wim = cls.db.get_one("wim_accounts", {"_id": wim_account_id}) or {}
+ cls.db_wims[wim_account_id] = db_wim
+ return db_wim
+
@classmethod
def get_all_wim_accounts(cls):
if not cls.db: