Merge "Remove @expression from tags"

This commit is contained in:
Zuul 2018-03-07 15:46:12 +00:00 committed by Gerrit Code Review
commit 6077dd1a45
1 changed files with 1 additions and 6 deletions

View File

@ -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):