diff options
Diffstat (limited to 'nova/objects/instance.py')
-rw-r--r-- | nova/objects/instance.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/nova/objects/instance.py b/nova/objects/instance.py index 467a129045..87c2eea602 100644 --- a/nova/objects/instance.py +++ b/nova/objects/instance.py @@ -1504,7 +1504,9 @@ class InstanceList(base.ObjectListBase, base.NovaObject): # NOTE(mriedem): Filter out hidden instances since there should be a # non-hidden version of the instance in another cell database and the # API will only show one of them, so we don't count the hidden copy. - project_query = project_query.filter_by(hidden=false()) + project_query = project_query.filter( + or_(models.Instance.hidden == false(), + models.Instance.hidden == null())) project_result = project_query.first() fields = ('instances', 'cores', 'ram') |