mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
netcmd: models: SDDLField move line down where it gets used
Signed-off-by: Rob van der Linde <rob@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jo Sutton <josutton@catalyst.net.nz>
This commit is contained in:
parent
63064d4c9f
commit
73c44e96dd
@ -402,7 +402,6 @@ class SDDLField(Field):
|
||||
return ndr_unpack(security.descriptor, value[0])
|
||||
|
||||
def to_db_value(self, ldb, value, flags):
|
||||
domain_sid = security.dom_sid(ldb.get_domain_sid())
|
||||
if value is None:
|
||||
return
|
||||
elif isinstance(value, list):
|
||||
@ -411,6 +410,8 @@ class SDDLField(Field):
|
||||
flags,
|
||||
self.name)
|
||||
else:
|
||||
domain_sid = security.dom_sid(ldb.get_domain_sid())
|
||||
|
||||
# If this is a SDDL string convert it to a descriptor.
|
||||
if isinstance(value, str):
|
||||
desc = security.descriptor.from_sddl(
|
||||
|
Loading…
Reference in New Issue
Block a user