-
Notifications
You must be signed in to change notification settings - Fork 19
Description
NetBox Secrets plugin version
v2.2.1
NetBox version
v4.2.9-Docker-3.2.1
Steps to Reproduce
try roll back to use version 2.2.0 the issue still persist
- login using admin account
- go to secret -> Add user Key
- Generate A new Key Pair
- no RSA Key was generate
try to generate manually
- login using admin account
- go to secret -> Add user Key
- paste Public Key in the box
- throw error Server Error
`class 'AttributeError'>
'str' object has no attribute '_meta'`
Expected Behavior
the user keys should be able to create or generate a new key pair
Observed Behavior
Debug Log:
2025-06-16 14:44:42,194 django.template DEBUG: Exception while resolving variable 'fieldsets' in template 'netbox_secrets/userkey_edit.html'. Traceback (most recent call last): File "/opt/netbox/venv/lib/python3.12/site-packages/django/forms/forms.py", line 174, in __getitem__ field = self.fields[name] ~~~~~~~~~~~^^^^^^ KeyError: 'fieldsets' During handling of the above exception, another exception occurred: File "/opt/netbox/venv/lib/python3.12/site-packages/django/template/base.py", line 883, in _resolve_lookup current = current[bit] ~~~~~~~^^^^^ File "/opt/netbox/venv/lib/python3.12/site-packages/django/forms/forms.py", line 176, in __getitem__ raise KeyError( KeyError: "Key 'fieldsets' not found in 'UserKeyForm'. Choices are: public_key." File "/opt/netbox/venv/lib/python3.12/site-packages/django/template/base.py", line 893, in _resolve_lookup ^^^^^^^^^^^^^^^^^^^^^ current = getattr(current, bit) AttributeError: 'UserKeyForm' object has no attribute 'fieldsets'. Did you mean: 'fields'? File "/opt/netbox/venv/lib/python3.12/site-packages/django/template/base.py", line 899, in _resolve_lookup current = current[int(bit)] ^^^^^^^^ ValueError: invalid literal for int() with base 10: 'fieldsets' File "/opt/netbox/venv/lib/python3.12/site-packages/django/template/base.py", line 906, in _resolve_lookup raise VariableDoesNotExist( django.template.base.VariableDoesNotExist: Failed lookup for key [fieldsets] in <UserKeyForm bound=False, valid=Unknown, fields=(public_key)> 2025-06-16 14:44:42,215 netbox.config DEBUG: Cleared configuration

