Handling multiple query results in models.py

Bug #1421744 reported by Devdatta Kulkarni on 2015-02-13
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Solum
Low
Unassigned

Bug Description

Currently in models.py, we are using the following pattern for returning query results:

filter_by_project(context, result).one()

When multiple values that match the query criteria are present in a table, above will throw MultipleResultsFound exception.

Currently we are not catching this exception in models.py.

As an example see:

https://review.openstack.org/#/c/154645/2

This bug is to track work that we should do to change models.py to catch and handle correct exceptions.

Adrian Otto (aotto) on 2015-06-12
Changed in solum:
status: New → Triaged
Adrian Otto (aotto) on 2015-06-12
Changed in solum:
milestone: none → 2015.1.1
tags: added: solum-conductor
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers