Fixed here: https://github.com/saleor/saleor/pull/19984 The old test passed for the wrong reason, so we fixed that too.
Bonus: we've also created semgrep rule to prevent unassigned querysets: https://github.com/saleor/saleor/pull/19997