ArnesSI / netbox-inventory

Manage your hardware inventory in NetBox
MIT License
204 stars 19 forks source link

Netbox Inventory Custom Field #189

Open Toems-UKL opened 3 weeks ago

Toems-UKL commented 3 weeks ago

Since a new fresh installation of Netbox (Version 4.0.9) Netbox Inventory is not available at "Object types" and "Related object type" when i want Create a Custom Field. Other Plugins like Netbox Attachments are available.

matejv commented 3 weeks ago

It seems to happen on any netbox 4.0.x version on a fresh install and for now it seems to be an issue related to netbox-attachments plugin or the order in which the plugins are specified in netbox config. All plugins listed after netbox_attachments have their models missing.

So for example with this config:

PLUGINS = [
    'netbox_attachments',
    'netbox_inventory',
    'netbox_dns',
]

I cannot select any object types from netbox_inventory or netbox_dns when creating custom field.

If I move netbox_attachments to last place:

PLUGINS = [
    'netbox_inventory',
    'netbox_dns',
    'netbox_attachments',
]

Then I can select object types from all three plugins.

I'm not sure what is going on. Looking at netbox_inventory and netbox_attachments code, I don't see any obvious reason for this issue. This issue might take a while to resolve.

For now I suggest you try to move netbox_attachments to last place in your PLUGINS setting and let me know if it works.

Toems-UKL commented 3 weeks ago

It seems to happen on any netbox 4.0.x version on a fresh install and for now it seems to be an issue related to netbox-attachments plugin or the order in which the plugins are specified in netbox config. All plugins listed after netbox_attachments have their models missing.

So for example with this config:

PLUGINS = [
    'netbox_attachments',
    'netbox_inventory',
    'netbox_dns',
]

I cannot select any object types from netbox_inventory or netbox_dns when creating custom field.

If I move netbox_attachments to last place:

PLUGINS = [
    'netbox_inventory',
    'netbox_dns',
    'netbox_attachments',
]

Then I can select object types from all three plugins.

I'm not sure what is going on. Looking at netbox_inventory and netbox_attachments code, I don't see any obvious reason for this issue. This issue might take a while to resolve.

For now I suggest you try to move netbox_attachments to last place in your PLUGINS setting and let me know if it works.

Thank you so much. That did the trick. Maybe we should contact the developer of the attachments plugin.