|
837 |
# Make sure all default values are set... |
837 |
# Make sure all default values are set... |
838 |
for name, p in self.descriptions.items(): |
838 |
for name, p in self.descriptions.items(): |
839 |
# ... if property has no option or any required option is currently enabled |
839 |
# ... if property has no option or any required option is currently enabled |
840 |
if self.has_key(name) and p.default(self): # noqa: W601 |
840 |
# Unset extending attributes with datatype boolean are interpreted as false |
|
|
841 |
# and should not be set to their default value during object modification. |
842 |
existing_boolean = self.exists() and p.syntax.type == 'boolean' |
843 |
if self.has_key(name) and p.default(self) and not existing_boolean: # noqa: W601 |
841 |
self[name] # __getitem__ sets default value |
844 |
self[name] # __getitem__ sets default value |
842 |
|
845 |
|
843 |
def _ldap_object_classes(self, ml): |
846 |
def _ldap_object_classes(self, ml): |