'Forms:' section is now truly optional in ui definition

The only mandatory section of the UI definition file is the
"Application" block which defines the input object model snippet.
Everything else is optional: the app developer may have no user input
for their app besides its name.

However, the UI was crashing if no 'Forms:' section is present. This
has been fixed.

Change-Id: Ie72770a8810369e2bff9a59e8f3845144032f080
Closes-bug: #1630672
This commit is contained in:
Alexander Tivelkov 2016-10-05 19:52:46 +03:00 committed by Kirill Zaitsev
parent e3927b0724
commit d47dccfc6f
1 changed files with 2 additions and 0 deletions

View File

@ -63,6 +63,8 @@ class Service(object):
self.cleaned_data = cleaned_data
self.templates = templates or {}
self.spec_version = str(version)
if forms is None:
forms = []
if application is None:
raise ValueError('Application section is required')