Further cleanups in defaults handling code.
- Clear up a comment - Rename 'keys, values' to 'key, value' - Fix potential bug: If the default for a given form entry is a list, but the form provided only one value (and didn't indicate it should be a list with :list), appending the defaults would fail. - Fix bug: If the default is a list of primitive items (not records), none of them would be added to the form field due to the use of the wrong (potentially non-existing) variable name. - Use isinstance(var, lt) instead of type(var) == type([]).
Showing
Please register or sign in to comment