Allows passing arguments through
Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
else:
return self.dn == other.dn
- def __json__(self):
+ def __json__(self, **kwargs):
"""Automatically called by custom JSONEncoder class."""
- return self.as_dict()
+ return self.as_dict(**kwargs)
@staticmethod
def get_base_dn(ldb):
self._apply(ldb, res[0])
- def as_dict(self, include_hidden=False):
+ def as_dict(self, include_hidden=False, **kwargs):
"""Returns a dict representation of the model.
:param include_hidden: Include fields with hidden=True when set