diff options
author | Gage Hugo <gagehugo@gmail.com> | 2018-02-27 19:55:22 +0000 |
---|---|---|
committer | Gage Hugo <gagehugo@gmail.com> | 2018-03-01 13:26:00 +0000 |
commit | b98748cbfdbcc8918dfb5cbcc0a4d35a99906fdf (patch) | |
tree | f52cc68ab145022a64f43436f5502e795defe463 | |
parent | c06d74fcf4cf5338db6572265c609036f6817466 (diff) | |
download | keystone-b98748cbfdbcc8918dfb5cbcc0a4d35a99906fdf.tar.gz |
Remove @expression from tags
This change makes tags a property of Project instead of a hybrid_property
since we will always have a Project contain some list of tags.
Change-Id: I1033321132cb3ec71bf94b8293cef91dfc6b8272
Co-Authored-By: Morgan Fainberg <morgan.fainberg@gmail.com>
Closes-Bug: #1752301
-rw-r--r-- | keystone/resource/backends/sql.py | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/keystone/resource/backends/sql.py b/keystone/resource/backends/sql.py index 65d01ac23..71f06adfc 100644 --- a/keystone/resource/backends/sql.py +++ b/keystone/resource/backends/sql.py @@ -12,7 +12,6 @@ from oslo_log import log from six import text_type -from sqlalchemy.ext.hybrid import hybrid_property from sqlalchemy import orm from keystone.common import driver_hints @@ -316,7 +315,7 @@ class Project(sql.ModelBase, sql.ModelDictMixinWithExtras): # rather than just only 'name' being unique __table_args__ = (sql.UniqueConstraint('domain_id', 'name'),) - @hybrid_property + @property def tags(self): if self._tags: return [tag.name for tag in self._tags] @@ -332,10 +331,6 @@ class Project(sql.ModelBase, sql.ModelDictMixinWithExtras): new_tags.append(tag_ref) self._tags = new_tags - @tags.expression - def tags(cls): - return ProjectTag.name - class ProjectTag(sql.ModelBase, sql.ModelDictMixin): |