Pass multi-valued fields to clean_user_data#277
Pass multi-valued fields to clean_user_data#277Freddo3000 wants to merge 1 commit intoetianen:masterfrom
clean_user_data#277Conversation
|
In retrospect, the original behavior was a bit odd. I'm not sure, however, whether you new proposed behaviour isn't also somewhat odd. Wouldn't it be better to just leave lists as lists, and single values as single values? This would also be a backwards-incompatible change, but one that would leave data in the form sent by the LDAP server rather than applying arbitrary rules to coerce it to single values or lists. |
|
Either case works, the reason I went with this solution is because this solution breaks backwards compatibility slightly less. I'd imagine in most LDAP databases, each field that you'd want to transfer to Django only has a single value as expected in a custom As you say, either solution would break backwards compatibility, but your solution would at least force someone to account for it instead of possibly silently failing. |
|
Can we go with my suggestion of leaving the server data as-is? A breaking change is fine, they happen sometimes. |
Fine with me, I just want all LDAP data to be preserved. |
Resolves #276
Breaks backwards compatibility slightly in that it may pass lists as input to
clean_user_data, which may break already existing custom implementations of it, but the fix is easy.