Remove duplicate code in Objects create() function

Remove duplicate code updates.pop('id', None) in create() function.
Because if self.obj_attr_is_set('id'):
            raise exception.ObjectActionError(action='create',
            reason='already created')
already make sure object doesn't have 'id' values, which means that
'id' won't appear in updates.

Change-Id: I582ef8857b32c07ea8ba1eb5fc1e64516110f3ce
This commit is contained in:
tanlin
2014-06-16 14:15:26 +08:00
parent fc03bd4595
commit 6197b41534
7 changed files with 0 additions and 7 deletions

View File

@@ -71,7 +71,6 @@ class Aggregate(base.NovaPersistentObject, base.NovaObject):
"create.start",
payload)
metadata = updates.pop('metadata', None)
updates.pop('id', None)
db_aggregate = db.aggregate_create(context, updates, metadata=metadata)
self._from_db_object(context, self, db_aggregate)
payload['aggregate_id'] = self.id