sts-sponsors team mailing list archive
-
sts-sponsors team
-
Mailing list archive
-
Message #03988
Re: [Merge] ~ack/maas:ws-machine-list-cleanup into maas:master
Diff comments:
> diff --git a/src/maasserver/websockets/handlers/machine.py b/src/maasserver/websockets/handlers/machine.py
> index d5ae491..26407c6 100644
> --- a/src/maasserver/websockets/handlers/machine.py
> +++ b/src/maasserver/websockets/handlers/machine.py
> @@ -323,9 +323,8 @@ class MachineHandler(NodeHandler):
> def dehydrate(self, obj, data, for_list=False):
> """Add extra fields to `data`."""
> data = super().dehydrate(obj, data, for_list=for_list)
> - data.update(
> - {"locked": obj.locked, "pool": self.dehydrate_pool(obj.pool)}
> - )
These are not needed as they are already declared in `list_fields`
> + data["workload_annotations"] = OwnerData.objects.get_owner_data(obj)
> + data["parent"] = getattr(obj.parent, "system_id", None)
> # Try to use the annotated event description so its loaded in the same
> # query as loading the machines. Otherwise fallback to the method on
> # the machine.
--
https://code.launchpad.net/~ack/maas/+git/maas/+merge/434441
Your team MAAS Maintainers is requested to review the proposed merge of ~ack/maas:ws-machine-list-cleanup into maas:master.
References