diff options
Diffstat (limited to 'oslo_db/sqlalchemy/update_match.py')
-rw-r--r-- | oslo_db/sqlalchemy/update_match.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/oslo_db/sqlalchemy/update_match.py b/oslo_db/sqlalchemy/update_match.py index 5765817..543101e 100644 --- a/oslo_db/sqlalchemy/update_match.py +++ b/oslo_db/sqlalchemy/update_match.py @@ -164,9 +164,9 @@ def update_on_match( entity = inspect(specimen) mapper = entity.mapper - assert \ - [desc['type'] for desc in query.column_descriptions] == \ - [mapper.class_], "Query does not match given specimen" + if [desc['type'] for desc in query.column_descriptions] != \ + [mapper.class_]: + raise AssertionError("Query does not match given specimen") criteria = manufacture_entity_criteria( specimen, include_only=include_only, exclude=[surrogate_key]) |