is_global == 1 don't work with postgresql

Bug #892429 reported by Patrick Hetu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
Undecided
Ziad Sawalha

Bug Description

With the current trunk

In keystone/backends/sqlalchemy/api/tenant.py :

  189 filter(endpointTemplates.is_global == 1)

Give this error with postgresql as backend:

  File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 299, in do_execute
    cursor.execute(statement, parameters)
ProgrammingError: (ProgrammingError) operator does not exist: boolean = integer
LINE 4: WHERE endpoint_templates_1.is_global = 1 UNION SELECT endpoi...
                                                                                                       ^
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.

I think True should be use instead of 1

Tags: postgresql
Changed in keystone:
assignee: nobody → Ziad Sawalha (ziad-sawalha)
milestone: none → essex-2
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix merged to keystone (master)

Reviewed: https://review.openstack.org/2107
Committed: http://github.com/openstack/keystone/commit/ef50a3353292265846e9276db0d0b98753ee8945
Submitter: Jenkins
Branch: master

 status fixcommitted
 done

commit ef50a3353292265846e9276db0d0b98753ee8945
Author: Ziad Sawalha <email address hidden>
Date: Tue Dec 6 12:44:09 2011 -0600

    Change is_global == 1 to is_global == True

    Fixes bug 892429 - which correctly points out incorrect use of integer 1 instead of boolean True

    Change-Id: I360ba8275ca3e67af6b99a7859421aa2e3c0d2bc

Changed in keystone:
status: New → Fix Committed
Thierry Carrez (ttx)
Changed in keystone:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in keystone:
milestone: essex-2 → 2012.1
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.