Duplicate "Smart Class Parameter" entries created whenever puppet class is imported
Bugzilla Link - https://bugzilla.redhat.com/show_bug.cgi?id=1384017
Description of problem:
- Whenever we import the puppet classes, it creates duplicate entries of the "Smart Class Parameters" in the WebUI.
If we run the hammer command to list the smart class parameter then it matches with the puppet environment count.
If we remove a puppet environment the smart class count is decreased in hammer but not on the WebUI.
Steps to Reproduce:
-> Create a content view with puppet modules (with smart class parameter).
-> Go to the puppet classes page and import the puppet classes.
- Duplicate smart class parameter entries are created in the WebUI.
- No duplicate smart class parameter is expected without an association with the puppet environments / puppet classes.
- Duplicate entries are increasing by one whenever we import the classes (only in the WebUI, not on the hammer output).
- It is observed that only one smart class parameter is associated with the puppet class and the rest are duplicate entries (no association with puppet classes / environments).