netcmd: models: model __json__ method should call as_dict instead
authorRob van der Linde <rob@catalyst.net.nz>
Mon, 26 Feb 2024 00:45:54 +0000 (13:45 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 1 Mar 2024 04:45:36 +0000 (04:45 +0000)
commit982ebebfbe15221c2d4f8d9611426ae0a06e2bd5
treecaf786e7d4dfd83c2a234ed655fcbd6b01691018
parent181764a5d629f4dd65641fa2d61a7c6d324e9a24
netcmd: models: model __json__ method should call as_dict instead

The comment about RelatedField is not really relevant so removed that part, RelatedField isn't used at this point.

The idea with RelatedField is that it fetches the object (vs DnField which just returns a Dn).

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
python/samba/netcmd/domain/models/model.py