From fbd73a48c43b461f4a8109163fcd67ed36925208 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Tue, 8 Aug 2017 21:43:04 -0500 Subject: [PATCH] Fix status when cloning upgrade --- tailbone/views/upgrades.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tailbone/views/upgrades.py b/tailbone/views/upgrades.py index fab03016..b02ac095 100644 --- a/tailbone/views/upgrades.py +++ b/tailbone/views/upgrades.py @@ -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()