2
0
Эх сурвалжийг харах

Fixes #11650: Display error message when attempting to create device component with duplicate name

jeremystretch 3 жил өмнө
parent
commit
95b2acb603

+ 2 - 0
docs/release-notes/version-3.4.md

@@ -17,8 +17,10 @@
 * [#11528](https://github.com/netbox-community/netbox/issues/11528) - Permit import of devices using uploaded file
 * [#11528](https://github.com/netbox-community/netbox/issues/11528) - Permit import of devices using uploaded file
 * [#11555](https://github.com/netbox-community/netbox/issues/11555) - Avoid inadvertent interpretation of search query as regular expression under global search (previously [#11516](https://github.com/netbox-community/netbox/issues/11516))
 * [#11555](https://github.com/netbox-community/netbox/issues/11555) - Avoid inadvertent interpretation of search query as regular expression under global search (previously [#11516](https://github.com/netbox-community/netbox/issues/11516))
 * [#11562](https://github.com/netbox-community/netbox/issues/11562) - Correct ordering of virtual chassis interfaces with duplicate names
 * [#11562](https://github.com/netbox-community/netbox/issues/11562) - Correct ordering of virtual chassis interfaces with duplicate names
+* [#11574](https://github.com/netbox-community/netbox/issues/11574) - Fix exception when attempting to schedule reports/scripts
 * [#11620](https://github.com/netbox-community/netbox/issues/11620) - Correct available filter choices for interface PoE type
 * [#11620](https://github.com/netbox-community/netbox/issues/11620) - Correct available filter choices for interface PoE type
 * [#11635](https://github.com/netbox-community/netbox/issues/11635) - Pre-populate assigned VRF when following "first available IP" link from prefix view
 * [#11635](https://github.com/netbox-community/netbox/issues/11635) - Pre-populate assigned VRF when following "first available IP" link from prefix view
+* [#11650](https://github.com/netbox-community/netbox/issues/11650) - Display error message when attempting to create device component with duplicate name
 
 
 ---
 ---
 
 

+ 3 - 0
netbox/netbox/views/generic/object_views.py

@@ -453,6 +453,9 @@ class ComponentCreateView(GetReturnURLMixin, BaseObjectView):
 
 
                 if component_form.is_valid():
                 if component_form.is_valid():
                     new_components.append(component_form)
                     new_components.append(component_form)
+                else:
+                    form.errors.update(component_form.errors)
+                    break
 
 
             if not form.errors and not component_form.errors:
             if not form.errors and not component_form.errors:
                 try:
                 try: