Skip to content

'function' object has no attribute 'items' after upgrading to 4.4.0 #325

@Ikke

Description

@Ikke

Plugin Version

0.6.1

NetBox Version

4.4.0

Python Version

3.12

Steps to Reproduce

N/A

Expected Behavior

N/A

Observed Behavior

After upgrading nettbox to 4.4.0, netbox fails to run with the error:

Traceback (most recent call last):
  File "/usr/local/bin/netbox", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/lib/python3.12/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
    utility.execute()
  File "/usr/lib/python3.12/site-packages/django/core/management/__init__.py", line 416, in execute
    django.setup()
  File "/usr/lib/python3.12/site-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/usr/lib/python3.12/site-packages/django/apps/registry.py", line 124, in populate
    app_config.ready()
  File "/usr/lib/python3.12/site-packages/netbox_branching/__init__.py", line 53, in ready
    for app_label, models in registry['model_features']['change_logging'].items():
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'function' object has no attribute 'items'

Perhaps related, netbox-community/netbox@a59da37 migrates the model features from FEATURES_MAP to using register_model_feature, which is supplied with a lambda.

Metadata

Metadata

Assignees

Labels

severity: lowDoes not significantly disrupt application functionality, or a workaround is availablestatus: acceptedtype: bugA confirmed report of unexpected behavior in the application

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions