Handling multiple query results in models.py

Bug #1421744 reported by Devdatta Kulkarni
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Solum
Triaged
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.

Revision history for this message
James Li (james-li-3) wrote :
Adrian Otto (aotto)
Changed in solum:
status: New → Triaged
Adrian Otto (aotto)
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.