Explorar el Código

[defaults] [fix] fix in get_defaults_for

version-14
Anand Doshi hace 12 años
padre
commit
75c76eec45
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. +2
    -1
      webnotes/defaults.py

+ 2
- 1
webnotes/defaults.py Ver fichero

@@ -109,8 +109,9 @@ def get_defaults_for(parent="Control Panel"):
for d in res:
if d.defkey in defaults:
# listify
if isinstance(defaults[d.defkey], basestring) and defaults[d.defkey] != d.defvalue:
if not isinstance(defaults[d.defkey], list) and defaults[d.defkey] != d.defvalue:
defaults[d.defkey] = [defaults[d.defkey]]
if d.defvalue not in defaults[d.defkey]:
defaults[d.defkey].append(d.defvalue)
else:


Cargando…
Cancelar
Guardar