Fix status when cloning upgrade
This commit is contained in:
parent
d7f5211fc4
commit
fbd73a48c4
|
@ -147,6 +147,8 @@ class UpgradeView(MasterView):
|
|||
f.remove_field('stderr_file')
|
||||
if self.creating:
|
||||
f.remove_field('status_code')
|
||||
else:
|
||||
f.set_readonly('status_code')
|
||||
if self.creating or not upgrade.executed:
|
||||
f.remove_field('executed')
|
||||
f.remove_field('executed_by')
|
||||
|
@ -175,6 +177,7 @@ class UpgradeView(MasterView):
|
|||
cloned.created_by = self.request.user
|
||||
cloned.description = original.description
|
||||
cloned.notes = original.notes
|
||||
cloned.status_code = self.enum.UPGRADE_STATUS_PENDING
|
||||
cloned.enabled = original.enabled
|
||||
self.Session.add(cloned)
|
||||
self.Session.flush()
|
||||
|
|
Loading…
Reference in a new issue