renatoalmeidaoliveira / nbservice

Netbox Plugin for ITSM service mapping.
Apache License 2.0
53 stars 5 forks source link

Plugin broken on Netbox 3.7 #12

Closed captainCrench closed 5 months ago

captainCrench commented 7 months ago

It looks like some issues with forms as things may have been moved around. Was able to verify this fixes it:

from utilities.forms import BootstrapMixin from utilities.forms.widgets import DatePicker from utilities.forms.fields import DynamicModelMultipleChoiceField, DynamicModelChoiceField

But when trying to add a service, I get a serializer exception so there may be more edits needed to get this to work on newer Netbox versions.

captainCrench commented 7 months ago

The error: _Traceback (most recent call last): File "/opt/netbox/netbox/utilities/api.py", line 32, in get_serializer_for_model return dynamic_import(serializer_name) File "/opt/netbox/netbox/utilities/utils.py", line 126, in dynamic_import mod = getattr(mod, comp) AttributeError: module 'nbservice.api.serializers' has no attribute 'ServiceSerializer'

misch42 commented 6 months ago

Error in my 3.7.3 setup:

Applying database migrations (python3 netbox/manage.py migrate)... Traceback (most recent call last): File "/opt/netbox-3.7.3/netbox/manage.py", line 10, in execute_from_command_line(sys.argv) (...) File "/opt/netbox-3.7.3/venv/lib64/python3.9/site-packages/nb_service/forms.py", line 8, in from utilities.forms import BootstrapMixin, DatePicker, DynamicModelMultipleChoiceField, DynamicModelChoiceField ImportError: cannot import name 'DatePicker' from 'utilities.forms' (/opt/netbox-3.7.3/netbox/utilities/forms/init.py)

opensourceXnetbox commented 6 months ago

Same problem!

renatoalmeidaoliveira commented 5 months ago

@opensourceXnetbox, @misch42, @captainCrench please update the plugin to 2.0.0

opensourceXnetbox commented 5 months ago

@opensourceXnetbox, @misch42, @captainCrench please update the plugin to 2.0.0

Hey @renatoalmeidaoliveira, thanks for the fix, it works perfectly.

misch42 commented 5 months ago

thanks. works for me now.