You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The offending code is here. The traceback looks like this:
Traceback (innermost last):
Module ZPublisher.WSGIPublisher, line 176, in transaction_pubevents
Module ZPublisher.WSGIPublisher, line 385, in publish_module
Module ZPublisher.WSGIPublisher, line 280, in publish
Module ZPublisher.mapply, line 85, in mapply
Module ZPublisher.WSGIPublisher, line 63, in call_object
Module Products.CMFPlone.controlpanel.browser.usergroups_usermembership, line 57, in __call__
Module Products.CMFPlone.controlpanel.browser.usergroups_usermembership, line 54, in update
Module Products.CMFPlone.controlpanel.browser.usergroups_usermembership, line 63, in getGroups
TypeError: '<' not supported between instances of 'bool' and 'str'
The issue is that when there's a None value in the groupResults (which is anticipated in the sort code) the lambda returns False which fails to compare against the group title/name strings under Python 3. The list comprehension that defines groupResults should probably just filter out None values to avoid this issue. I'm not entirely sure what circumstances result in a None group value, but I am seeing it occur in a real world use case.
The text was updated successfully, but these errors were encountered:
The offending code is here. The traceback looks like this:
The issue is that when there's a
None
value in thegroupResults
(which is anticipated in the sort code) the lambda returnsFalse
which fails to compare against the group title/name strings under Python 3. The list comprehension that definesgroupResults
should probably just filter outNone
values to avoid this issue. I'm not entirely sure what circumstances result in aNone
group value, but I am seeing it occur in a real world use case.The text was updated successfully, but these errors were encountered: