Closed ghost closed 3 years ago
It can take a list object. I'm assuming userinfo
only contains one element, thus is only generating a list with a single page -- which was originally an unintended way to construct a menu. The original thought process being it isn't really a menu if it only has a single page.
That said, this issue has come up a few times now so I think I consider it a flaw rather than a safety feature -- because a single page should be representable in a dynamically generated menu.
I am going to look at removing or changing this validation check.
I am going to look at removing or changing this validation check.
All right! Thank you, that makes things a lot easier!
This is fixed as of the most recent release (#31).
If I create a menu as follows:
and attempt to open it, I am given the result of
ERROR:root:There must be more than one page in a menu. Expected at least 2, found 1.
Can I not pass a list object to the
.add_pages()
function, and if so - why not? Is this desirable behavior, or is it an unintended effect?If I cannot pass a list object, would it be possible for this functionality to be implemented?