k1nky / netbox-otp-plugin

This netbox plugin adds support for one-time password (OTP) to Netbox.
Apache License 2.0
22 stars 2 forks source link

Netbox 4.1.0 compatibility #14

Open bangingheads opened 3 weeks ago

bangingheads commented 3 weeks ago

Netbox 4.1.0 removed AUTH_EXEMPT_PATHS which causes the plugin unable to migrate.

File "/opt/netbox-4.1.0/venv/lib/python3.10/site-packages/netbox_otp_plugin/__init__.py", line 15, in <module>
    netbox_settings.AUTH_EXEMPT_PATHS = netbox_settings.AUTH_EXEMPT_PATHS + (f'/{netbox_settings.BASE_PATH}plugins/otp',)
AttributeError: partially initialized module 'netbox.settings' has no attribute 'AUTH_EXEMPT_PATHS' (most likely due to a circular import)

https://github.com/netbox-community/netbox/pull/16662

Omgzilla commented 2 weeks ago

First of all, thank you so much for this plugin!

Getting the same issue. Is it safe to just remove the lines ourselves or should we wait for an update?

k1nky commented 1 week ago

Thank you for your feedback.

@Omgzilla Since version 4.1.0 AUTH_EXEMPT_PATHS is no longer used and it is safe to remove these lines.

Please try v1.3.0. It is compatible with NetBox 4.1.

Omgzilla commented 4 days ago

Yes! Will try it today. Thanks a lot!

UPDATE It worked flawlessly! Migrated from v3.7.7 -> v4.1.2. Thanks again!