Files @ d22a7430999f
Branch filter:

Location: kallithea/docs/api/models.rst - annotation

d22a7430999f 573 B text/prs.fallenstein.rst Show Source Show as Raw Download as Raw
Mads Kiilerich
auth: change get_allowed_ips to be more resilient when operating on a cached default user

Before, random changes to how things are fetched and cached across database
sessions could cause get_allowed_ips to fail with:

DetachedInstanceError: Instance <User> is not bound to a Session; attribute refresh operation cannot proceed (Background on this error at: http://sqlalche.me/e/bhk3)

Instead, just check for user_id, using same pattern as a bit later in same function.
.. _models:

========================
The :mod:`models` module
========================

.. automodule:: kallithea.model
   :members:

.. automodule:: kallithea.model.comment
   :members:

.. automodule:: kallithea.model.permission
   :members:

.. automodule:: kallithea.model.repo_permission
   :members:

.. automodule:: kallithea.model.repo
   :members:

.. automodule:: kallithea.model.repo_group
   :members:

.. automodule:: kallithea.model.scm
   :members:

.. automodule:: kallithea.model.user
   :members:

.. automodule:: kallithea.model.user_group
   :members: