summaryrefslogtreecommitdiffstats
path: root/nova/db
diff options
context:
space:
mode:
authorMichael Gundlach <michael.gundlach@rackspace.com>2010-10-05 13:40:17 -0400
committerMichael Gundlach <michael.gundlach@rackspace.com>2010-10-05 13:40:17 -0400
commit8a2d7efa542e168fda81f703fa8e8c19467bf800 (patch)
tree373bc6d8a070df0afe952d014fceb78c46092efc /nova/db
parent92066f4da113cf84f04213dd89ebc0bf8d51e7db (diff)
downloadnova-8a2d7efa542e168fda81f703fa8e8c19467bf800.tar.gz
nova-8a2d7efa542e168fda81f703fa8e8c19467bf800.tar.xz
nova-8a2d7efa542e168fda81f703fa8e8c19467bf800.zip
Fix clause comparing id to internal_id
Diffstat (limited to 'nova/db')
-rw-r--r--nova/db/sqlalchemy/api.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/nova/db/sqlalchemy/api.py b/nova/db/sqlalchemy/api.py
index 61feed9d0..870e7b1a5 100644
--- a/nova/db/sqlalchemy/api.py
+++ b/nova/db/sqlalchemy/api.py
@@ -663,8 +663,9 @@ def instance_get_by_internal_id(context, internal_id):
def instance_internal_id_exists(context, internal_id, session=None):
if not session:
session = get_session()
- return session.query(exists().where(models.Instance.id==internal_id)
- ).one()[0]
+ return session.query(
+ exists().where(models.Instance.internal_id==internal_id)
+ ).one()[0]
@require_context