From 35685a469e5ee02bd3354ba16afda211aa2c49e0 Mon Sep 17 00:00:00 2001 From: ellen Date: Tue, 27 Jun 2017 13:39:12 -0400 Subject: [PATCH] Make UI forms data accessible using $forms variable When creating context, save the context to the '$forms' variable as well as to '$'. The 'S' contents may change during evalation of collections and their methods but '$forms' will remain the same. This allows the forms data to be used as input to a collection's method. Change-Id: I4b32aa53cd7b56c07af7e593ead1736d81766ae7 Closes-Bug: 1700790 --- muranodashboard/dynamic_ui/services.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/muranodashboard/dynamic_ui/services.py b/muranodashboard/dynamic_ui/services.py index c89018034..96739c650 100644 --- a/muranodashboard/dynamic_ui/services.py +++ b/muranodashboard/dynamic_ui/services.py @@ -126,6 +126,8 @@ class Service(object): def extract_attributes(self): context = self.context.create_child_context() context['$'] = self.cleaned_data + context['$forms'] = self.cleaned_data + for name, template in six.iteritems(self.templates): context[name] = template if semantic_version.Version.coerce(self.spec_version) \