Bug originally filed by ack at https://bugs.launchpad.net/bugs/1991229
If I click the checkbox to select all machines in a state (e.g. New or Ready) in the UI, I see a traceback like this in the backend, with a validation error:
2022-09-29 09:30:34 maasserver.websockets.protocol: [critical] Error on request (34) machine.list: {"status": ["Select a valid choice. =ready is not one of the available choices."]}
Traceback (most recent call last):
File "/usr/lib/python3.10/threading.py", line 946, in run
self._target(*self._args, **self._kwargs)
File "/snap/maas/x6/lib/python3.10/site-packages/provisioningserver/utils/twisted.py", line 822, in worker
return target()
File "/snap/maas/x6/usr/lib/python3/dist-packages/twisted/_threads/_threadworker.py", line 47, in work
task()
File "/snap/maas/x6/usr/lib/python3/dist-packages/twisted/_threads/_team.py", line 182, in doWork
task()
--- ---
File "/snap/maas/x6/usr/lib/python3/dist-packages/twisted/python/threadpool.py", line 244, in inContext
result = inContext.theWork() # type: ignore[attr-defined]
File "/snap/maas/x6/usr/lib/python3/dist-packages/twisted/python/threadpool.py", line 260, in
inContext.theWork = lambda: context.call( # type: ignore[attr-defined]
File "/snap/maas/x6/usr/lib/python3/dist-packages/twisted/python/context.py", line 117, in callWithContext
return self.currentContext().callWithContext(ctx, func, *args, **kw)
File "/snap/maas/x6/usr/lib/python3/dist-packages/twisted/python/context.py", line 82, in callWithContext
return func(*args, **kw)
File "/snap/maas/x6/lib/python3.10/site-packages/provisioningserver/utils/twisted.py", line 857, in callInContext
return func(*args, **kwargs)
File "/snap/maas/x6/lib/python3.10/site-packages/provisioningserver/utils/twisted.py", line 203, in wrapper
result = func(*args, **kwargs)
File "/snap/maas/x6/lib/python3.10/site-packages/maasserver/utils/orm.py", line 771, in call_within_transaction
return func_outside_txn(*args, **kwargs)
File "/snap/maas/x6/lib/python3.10/site-packages/maasserver/utils/orm.py", line 574, in retrier
return func(*args, **kwargs)
File "/usr/lib/python3.10/contextlib.py", line 79, in inner
return func(*args, **kwds)
File "/snap/maas/x6/lib/python3.10/site-packages/maasserver/websockets/base.py", line 437, in prep_user_execute
return self._call_method_track_queries(
File "/snap/maas/x6/lib/python3.10/site-packages/maasserver/websockets/base.py", line 461, in _call_method_track_queries
result = method(params)
File "/snap/maas/x6/lib/python3.10/site-packages/maasserver/websockets/base.py", line 546, in list
qs_filter = self._filter(qs_filter, "list", params["filter"])
File "/snap/maas/x6/lib/python3.10/site-packages/maasserver/websockets/handlers/node.py", line 1248, in _filter
raise HandlerValidationError(form.errors)
maasserver.websockets.base.HandlerValidationError: {'status': ['Select a valid choice. =ready is not one of the available choices.']}