Closed matejv closed 1 month ago
I'll take a look at it, I also need to do some other changes.
@matejv could you try to install changes from https://github.com/Kani999/netbox-attachments/pull/66/files if everything works fine?
Seems to work fine, thank you. I tested attachments on netbox_inventory.Asset (plugin) model and dcim.DeviceType.
Netbox plugin migration guide instructs plugin developers to remove Nested API serializers and add support for "brief" mode to regular serializers .
In netbox-inventory plugin I have done as the migration guide instructs and now users cannot use netbox-inventory with netbox-attachments. See this issue for detailed description.
The problem originates here by calling
get_serializer_for_model
with prefix argument.You should probably change this to get a regular serializer and pass
brief=True
when calling it.If you wanted to keep backward compatibility you could first try to get nested serializer as it is now and on
netbox.api.exceptions.SerializerNotFound
error get the regular serializer withbrief=True
.I can submit a pull request if you'd like.