netbox DynamicModelMultipleChoiceField validation error #13181
Replies: 1 comment 6 replies
-
Please could you edit your post, and instead of a single backtick, put three backticks ( What version of Netbox are you using? I have no idea why it'sgetting a ConfigContextModelQuerySet, when the queryset is Device.objects.all(). What's in
There's one here, but it's inside NetBoxModelFilterSetForm rather than NetBoxModelForm. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello community!
Right now i am developing netbox plugin and trying to acomplish task where i can choose a few devices in form and add them to database table.
To do that i am using Model Form and DynamicModelMultipleChoiceField.
It is something wrong in my code so form can't be validated in correct way.
Get an error “<ConfigContextModelQuerySet [<Device: Phone5>]>” value must be an integer.
When i use DynamicModelChoiceField i have no any errors. But this used only for a single object.
Please advice how to fix that.
I have tried to find examples for DynamicModelMultipleChoiceField but no success.
My code.
forms.py
views.py
Beta Was this translation helpful? Give feedback.
All reactions