Pārlūkot izejas kodu

Make webui admin controller multivalue form input splitting more permissive

Now all "empty" values are deleted from the resulting array
Yann Weber 8 gadus atpakaļ
vecāks
revīzija
5f5a45569a
1 mainītis faili ar 1 papildinājumiem un 0 dzēšanām
  1. 1
    0
      lodel/plugins/webui/interface/controllers/admin.py

+ 1
- 0
lodel/plugins/webui/interface/controllers/admin.py Parādīt failu

@@ -317,6 +317,7 @@ def process_form(request):
317 317
                     value = []
318 318
             else:
319 319
                 value = [ v.strip() for v in value.split(LIST_SEPARATOR) ]
320
+                value = [ v for v in value if len(v) > 0]
320 321
         else:
321 322
             #Handling default value for empty string
322 323
             if len(value.strip()) == 0 and hasattr(dh, 'default'):

Notiek ielāde…
Atcelt
Saglabāt