Smart Class Parameter issue after upgrading to 2.3.1

Problem:
Upgrading from version version 2.2.x to version 2.3.1 introduced an issue with our “Smart Class Parameters”. If a puppet class is listed in multiple environments, each smart class parameter for that puppet class listed duplicated by the number of environments the class is part of.

For example:
Puppet Class: Puppet-Sample is a in Environments A.B.C,D
Puppet Class: Puppet-Sample has Param-1 defined.

In the UI, Param-1 is list 4 times. The URLs displayed for each of the Param-1 entries is identical.
Changes made in one of the entries is applied to all the duplicates before the update is submitted.

If I attempt to create a default override, the update fails. The returned error page shows that the “Override” check box is unchecked, even thought it was checked when submitted.
Expected outcome:
Smart Class Parameters are only listed once regardless of the number of environment the puppet class belongs to.
Updates to smart class parameter overrides update successfully regardless of the number of environment the puppet class belongs to.
Foreman and Proxy versions:
Foreman: 2.3.1
Foreman Proxies: 2.3.1
Foreman and Proxy plugin versions:

Distribution and version:
CentOS 7.9
Other relevant data:
Puppet server and proxy are hosted separately from Foreman server.

I have looked over all the release notes and redmine issues related to 2.3.0 and 2.3.1. Nothing stands out to me that would have created this issue. We have multiple independent Foreman installation. This issue is present on all of them post upgrade.

This is Bug #31538: Each smart class parameter appears twice, when having two environments - Foreman which will be resolved in 2.3.2. In the meantime you can apply the patch to your instance and restart it.