Commit 7a67fe74 authored by Ayush Tiwari's avatar Ayush Tiwari

Wendelin: Get empty json object for no erp5_request_parameters

parent e6e84996
......@@ -99,7 +99,7 @@ mode = 0644
[template-publish-information]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/template/publish-default-information.cfg.in
md5sum = ab217c0f8d8290c4ccf1fcea4273a6fe
md5sum = a07f8eb92afd76268e56a90f59a7f7b5
mode = 0644
[versions]
......
......@@ -6,7 +6,14 @@ eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }}
offline = true
{% set erp5_request_parameters = json_module.loads(erp5_published_values.get('erp5_request_parameters')) -%}
{% set erp5_request_parameters = erp5_published_values.get('erp5_request_parameters', '{}') -%}
# The previous line might not give valid json for 'None', for that we have to
# explicitly set 'erp5_request_parameters' value for empty json
{% if erp5_request_parameters=='' -%}
{% set erp5_request_parameters = '{}' -%}
{% endif -%}
# Now, we'll load the required json for erp5_request_parameters
{% set erp5_request_parameters = json_module.loads(erp5_request_parameters) -%}
{% set publish_dict = {} -%}
{% for name, value in erp5_request_parameters.iteritems() -%}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment