Fish Trophy

david got a fish trophy!

Fish Trophy

Fix handling of the "mode" parameter to the SAML link user view.

Review Request #12921 — Created March 24, 2023 and submitted — Latest diff uploaded

Information

Review Board
release-5.0.x

Reviewers

The check to see whether the passed-in mode parameter was a valid member
of the enum was incorrect (at least until Python 3.12), due to a
leftover from the implementation before the mode was implemented as an
enum. This was causing a TypeError inside __contains__, since that
can't check for values, only instances.

This change updates it to attempt to construct a Mode enum from the
value, and catching the error if it's not a correct value.

  • Verified that new try/except was the correct way to handle this.
  • Ran unit tests.

Commits

Files

    Loading...