Fixes for web forms (#2060)

This commit is contained in:
Neil Trini Lasrado 2016-09-15 17:12:44 +05:30 committed by Rushabh Mehta
parent 7166bc3e61
commit e804cd56e4
2 changed files with 3 additions and 3 deletions

View file

@ -178,7 +178,7 @@
</thead>
<tbody>
{{ render_row(field, {}, True) }}
{% if doc.get(field.fieldname) %}
{% if doc and doc.get(field.fieldname) %}
{% for d in doc.get(field.fieldname) %}
{{ render_row(field, d) }}
{% endfor %}

View file

@ -167,7 +167,7 @@ def get_context(context):
"<br>").replace("'", "\'")
self.add_custom_context_and_script(context)
def add_custom_context_and_script(self, context):
'''Update context from module if standard and append script'''
if self.is_standard:
@ -336,4 +336,4 @@ def make_route_string(parameters):
if key != "is_web_form":
route_string += route_string + delimeter + key + "=" + cstr(parameters[key])
delimeter = '&'
return (route_string,delimeter)
return (route_string, delimeter)