diff options
author | Julien Danjou <julien@danjou.info> | 2016-09-02 10:40:16 +0200 |
---|---|---|
committer | Julien Danjou <julien@danjou.info> | 2016-09-03 10:29:42 +0200 |
commit | bf3b21f75b94a4d8b533dd10fdeb9a64da344cf9 (patch) | |
tree | 5176ddff539573f1d89a8fffed04f8e0e88c47f3 /oslo_db/sqlalchemy/migration.py | |
parent | 2aec826a51562c6b6bdccd3a7d27f62e107ae150 (diff) | |
download | oslo-db-6c5f5810af545c0e5ee5fff608a1432daf56098d.tar.gz |
utils: fix get_unique_keys() when model has no table attached to it4.13.2
Using the internal SQLAlchemy __table__ to find unique keys on a model
class does not work if the model is not attached to a class. In this
case, it seems there is no way to find what the keys are: rather than
crashing or returning garbage, the function just returns None,
indicating it does not know how to get it.
The warning from paginate_query() is not emitted in this case, as
there's no way to guess if the developer did wrong or not.
Change-Id: I1291fe1f1e78471f18f230a66edff31ed199bc7a
(cherry picked from commit 49eaed489e4650e56ed2e270ba3e15ce2b421cc8)
Diffstat (limited to 'oslo_db/sqlalchemy/migration.py')
0 files changed, 0 insertions, 0 deletions