Fixes #9749: Retain original slug values when modifying object names

This commit is contained in:
jeremystretch 2022-07-19 13:01:51 -04:00
parent a7a20ad2ea
commit 802d9d2b6e
4 changed files with 4 additions and 1 deletions

View File

@ -13,6 +13,7 @@
* [#9715](https://github.com/netbox-community/netbox/issues/9715) - Fix `SOCIAL_AUTH_PIPELINE` config parameter not taking effect * [#9715](https://github.com/netbox-community/netbox/issues/9715) - Fix `SOCIAL_AUTH_PIPELINE` config parameter not taking effect
* [#9754](https://github.com/netbox-community/netbox/issues/9754) - Fix regression introduced by #9632 * [#9754](https://github.com/netbox-community/netbox/issues/9754) - Fix regression introduced by #9632
* [#9746](https://github.com/netbox-community/netbox/issues/9746) - Permit filtering interfaces by arbitrary speed value in UI * [#9746](https://github.com/netbox-community/netbox/issues/9746) - Permit filtering interfaces by arbitrary speed value in UI
* [#9749](https://github.com/netbox-community/netbox/issues/9749) - Retain original slug values when modifying object names
* [#9775](https://github.com/netbox-community/netbox/issues/9775) - Fix exception when viewing a report with no description * [#9775](https://github.com/netbox-community/netbox/issues/9775) - Fix exception when viewing a report with no description
--- ---

Binary file not shown.

Binary file not shown.

View File

@ -38,7 +38,9 @@ export function initReslug(): void {
slugLength = Number(slugLengthAttr); slugLength = Number(slugLengthAttr);
} }
sourceField.addEventListener('blur', () => { sourceField.addEventListener('blur', () => {
slugField.value = slugify(sourceField.value, slugLength); if (!slugField.value) {
slugField.value = slugify(sourceField.value, slugLength);
}
}); });
slugButton.addEventListener('click', () => { slugButton.addEventListener('click', () => {
slugField.value = slugify(sourceField.value, slugLength); slugField.value = slugify(sourceField.value, slugLength);