Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyError when trying to configure columns for Config Compliance table view #812

Open
joewesch opened this issue Oct 3, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@joewesch
Copy link
Contributor

joewesch commented Oct 3, 2024

Environment

  • Python version: 3.11.10
  • Nautobot version: 2.3.6
  • nautobot-golden-config version: 2.1.2

Expected Behavior

I expected to be able to set the columns in the table view on the Config Compliance page

Observed Behavior

<class 'KeyError'>

'dynamic_group_count'

Steps to Reproduce

  1. Go to Config Compliance table view
  2. Click the Configure button to edit the columns
  3. Make any (or no changes) and hit Save

Issue originally reported via slack: https://networktocode.slack.com/archives/C01NWPK6WHL/p1727879954240279

Workaround

Since this issue can cause the Config Compliance view to be rendered inoperable, you can use the following steps to remediate the issue temporarily:

  1. Click on your username in the side navigation bar and go to Profile
  2. Go to Preferences
  3. Select tables.ConfigComplianceTable.columns and click Clear Selected
@itdependsnetworks
Copy link
Contributor

@glennmatthews Does it seem reasonable to just turn dynamic groups off this model for now? e.g. is_dynamic_group_associable_model = False on the model.

@glennmatthews
Copy link
Contributor

If you don't see a use case for dynamic groups of ConfigCompliance, absolutely that would be the appropriate fix. See also the note added in v2.3.6 release notes (we missed it in v2.3.0, sorry!):

App Developers should review the feature set of their data models and consider whether their models should opt into or out of inclusion in Dynamic Groups, Contacts/Teams, Object Metadata, and Saved Views via the inclusion or omission of appropriate model mixins and flag variables. Refer to the developer documentation for details.

@gsnider2195 gsnider2195 added the bug Something isn't working label Nov 8, 2024
@gsnider2195
Copy link
Contributor

I think the fix here is just changing the order of operations in tables.py here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants