Browse Source

Fixed errors on PDF render

pull/160/head
Mike Olund 8 years ago
parent
commit
0c6cdd8a69
1 changed files with 8 additions and 3 deletions
  1. +8
    -3
      edivorce/apps/core/templatetags/input_field.py

+ 8
- 3
edivorce/apps/core/templatetags/input_field.py View File

@ -54,10 +54,15 @@ def check_list(source, value):
"""
Check if given value is in the given source
"""
return value in json.loads(source)
try:
return value in json.loads(source)
except:
return False
@register.assignment_tag
def multiple_values_to_list(source):
json_list = json.loads(source)
return json_list
try:
return json.loads(source)
except:
return []

Loading…
Cancel
Save