mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-23 04:22:01 -06:00
Cache custom fields on instance during bulk edit
This commit is contained in:
parent
bc04543b33
commit
ff5a3c1055
@ -949,6 +949,12 @@ class BulkEditView(GetReturnURLMixin, ObjectPermissionRequiredMixin, View):
|
|||||||
elif form.cleaned_data[name] not in (None, ''):
|
elif form.cleaned_data[name] not in (None, ''):
|
||||||
setattr(obj, name, form.cleaned_data[name])
|
setattr(obj, name, form.cleaned_data[name])
|
||||||
|
|
||||||
|
# Cache custom fields on instance prior to save()
|
||||||
|
if custom_fields:
|
||||||
|
obj._cf = {
|
||||||
|
name: form.cleaned_data[name] for name in custom_fields
|
||||||
|
}
|
||||||
|
|
||||||
obj.full_clean()
|
obj.full_clean()
|
||||||
obj.save()
|
obj.save()
|
||||||
updated_objects.append(obj)
|
updated_objects.append(obj)
|
||||||
|
Loading…
Reference in New Issue
Block a user