Don't need to update flavor if only access projects changed

Closes-Bug: #1718092
Change-Id: I043ecb9087eb3e8425432c6e325b7f87eaf96028
liusheng 2017-09-19 11:28:48 +08:00
parent 896eed5dea
commit f10c8e1c2e
1 changed files with 2 additions and 1 deletions

View File

@ -131,7 +131,8 @@ class Flavor(base.MoganObject, object_base.VersionedObjectDictCompat):
if added_projects or deleted_projects:
self.save_projects(context, added_projects, deleted_projects)
self.dbapi.flavor_update(context, self.uuid, updates)
if updates:
self.dbapi.flavor_update(context, self.uuid, updates)
def save_projects(self, context, to_add=None, to_delete=None):
"""Add or delete projects.