level12 / keg-auth

Robust authentication system for Keg

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Load orm entity in method

rsyring opened this issue · comments

Currently, init_object() loads the ORM entity instance directly:

self.objinst = self.orm_cls.query.get(obj_id)

But, it's possible a subclass would want to override how the instance is loaded.

We should move self.orm_cls.query.get(obj_id) to a orm_query_obj() or something similar which returns the instantiated entity object.