mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Redo boolean value encoding.
Move the code for encoding boolean values to LDAP boolean syntax from the Parameter class to the Encoder class, where the rest of LDAP encoding takes place. Remove encoding code from the Parameter class altogether, as all LDAP encoding should be done in the Encoder class.
This commit is contained in:
committed by
Martin Kosek
parent
abef5e8c02
commit
d9d1967989
@@ -933,12 +933,6 @@ last, after all sets and adds."""),
|
||||
raise errors.ValidationError(name=attr, error=err.error)
|
||||
except errors.ConversionError, err:
|
||||
raise errors.ConversionError(name=attr, error=err.error)
|
||||
# FIXME: We use `force` when encoding because we know this is
|
||||
# an attribute, even if it does not have the `attribute` flag
|
||||
# set. This happens with no_update attributes, which are
|
||||
# not cloned to Update commands. This cloning is where the flag
|
||||
# gets set.
|
||||
value = param.encode(value, force=True)
|
||||
entry_attrs[attr] = value
|
||||
else:
|
||||
# unknown attribute: remove duplicite and invalid values
|
||||
|
||||
Reference in New Issue
Block a user