You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a second config context with the same name string.
Expected Behavior
Creation of the second same-named ConfigContext should fail or be blocked by the UI due to the duplicate name. This is the behavior shown in NetBox 2.10.x.
Observed Behavior
Multiple same-named config contexts can coexist. This is problematic because, in the case of multiple contexts having the same weight, ties are broken based on the context name.
This appears to be another case where a unique_together constraint is not working as one might expect due to NULL!=NULL behavior of the database, as ConfigContext defines unique_together = [["name", "owner_content_type", "owner_object_id"]] and in common usage owner_content_type and owner_object_id will be NULL values.
The text was updated successfully, but these errors were encountered:
Environment
Steps to Reproduce
name
string.Expected Behavior
Creation of the second same-named ConfigContext should fail or be blocked by the UI due to the duplicate name. This is the behavior shown in NetBox 2.10.x.
Observed Behavior
Multiple same-named config contexts can coexist. This is problematic because, in the case of multiple contexts having the same weight, ties are broken based on the context name.
This appears to be another case where a
unique_together
constraint is not working as one might expect due toNULL!=NULL
behavior of the database, as ConfigContext definesunique_together = [["name", "owner_content_type", "owner_object_id"]]
and in common usageowner_content_type
andowner_object_id
will be NULL values.The text was updated successfully, but these errors were encountered: