aboutsummaryrefslogtreecommitdiffstats
path: root/src/workflow/snapshot_workflow.py
diff options
context:
space:
mode:
authorParker Berberian <pberberian@iol.unh.edu>2019-01-17 12:51:04 -0500
committerParker Berberian <pberberian@iol.unh.edu>2019-01-18 16:08:27 -0500
commit30dde45dbf5b47b7d4c18ed87779b2b2f2fec214 (patch)
tree7592d09cb57b5bbe76366090b8ce627bccbec4ee /src/workflow/snapshot_workflow.py
parentc19835a1c5eec9af87ace51b5c1dfd44e00a1e26 (diff)
OverHaul the Snapshot Workflow
Makes the Snapshot workflow much prettier and more functional. Change-Id: Icdd66f64e6d336ad49ed3cf638a301d0ca92fda9 Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
Diffstat (limited to 'src/workflow/snapshot_workflow.py')
-rw-r--r--src/workflow/snapshot_workflow.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/workflow/snapshot_workflow.py b/src/workflow/snapshot_workflow.py
index 4ddc397..0d53ed4 100644
--- a/src/workflow/snapshot_workflow.py
+++ b/src/workflow/snapshot_workflow.py
@@ -87,7 +87,14 @@ class Image_Meta_Step(WorkflowStep):
def get_context(self):
context = super(Image_Meta_Step, self).get_context()
- context['form'] = SnapshotMetaForm()
+ name = self.repo_get(self.repo.SNAPSHOT_NAME, False)
+ desc = self.repo_get(self.repo.SNAPSHOT_DESC, False)
+ form = None
+ if name and desc:
+ form = SnapshotMetaForm(initial={"name": name, "description": desc})
+ else:
+ form = SnapshotMetaForm()
+ context['form'] = form
return context
def post_render(self, request):