Verified Commit 1eef0c12 authored by Ziirish's avatar Ziirish

fix empty arrays

parent 2862242a
Pipeline #1312 passed with stages
in 8 minutes and 42 seconds
......@@ -30,6 +30,6 @@ indent_style = tab
indent_style = space
indent_size = 4
[.gitlab-ci.yml}]
[.gitlab-ci.yml]
indent_style = space
indent_size = 2
......@@ -323,6 +323,8 @@ class BUIConfig(dict):
"'{}': no such validator".format(cast)
)
return val
if cast == 'force_list' and val is None:
val = []
ret = caster(val)
# special case for boolean and integer, etc.
if ret is None:
......
......@@ -26,7 +26,7 @@ def sanitize_string(string, strict=True, paranoid=False):
else:
import re
ret = repr(string).replace('\\\\', '\\')
ret = re.sub(r"^u?'(.*)'$", r"\1", ret)
ret = re.sub(r"^u?(?P<quote>['\"])(.*)(?P=quote)$", r"\1", ret)
return to_unicode(ret)
......
......@@ -251,8 +251,6 @@ class BUIServer(Flask):
)
self.format_labels = []
for format_label in format_labels:
if not format_label:
continue
search = re.search(r'^s(?P<separator>.)(?P<regex>.*?)(?P=separator)(?P<replace>.*?)(?P=separator)$', format_label)
if search:
self.format_labels.append((search.group('regex'), search.group('replace')))
......
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