mirror of https://github.com/apache/cloudstack.git
marvin_refactor: update the object during non-create transforms
When an entity is updated/ the object attributes should be updated. Previously we only updated the attributes when creating the entity. Signed-off-by: Prasanna Santhanam <tsp@apache.org>
This commit is contained in:
parent
0fdc4e25bc
commit
8a816e5d19
|
|
@ -90,7 +90,7 @@ class Entity(object):
|
|||
'if %s and len(%s) > 0 else None' % (
|
||||
entity, entity.lower(), entity.lower(), entity.lower()))
|
||||
else:
|
||||
m.body.append(self.tabspace + 'return %s if %s else None' % (entity.lower(), entity.lower()))
|
||||
m.body.append(self.tabspace + 'return self.__update__(%s.__dict__) if %s else None' % (entity.lower(), entity.lower()))
|
||||
else:
|
||||
if len(details['args']) > 0: #has required arguments
|
||||
m.signature = 'def __init__(self, apiclient=None, %s, factory=None, **kwargs):' % (
|
||||
|
|
|
|||
Loading…
Reference in New Issue