mirror of
https://github.com/netbox-community/netbox.git
synced 2025-12-15 21:09:36 -06:00
Feat: added status update during save method of DataSourceForm
This commit is contained in:
parent
111aca115b
commit
bfeba36514
@ -95,6 +95,11 @@ class DataSourceForm(NetBoxModelForm):
|
|||||||
parameters[name[8:]] = self.cleaned_data[name]
|
parameters[name[8:]] = self.cleaned_data[name]
|
||||||
self.instance.parameters = parameters
|
self.instance.parameters = parameters
|
||||||
|
|
||||||
|
self.instance.status = self.cleaned_data['status']
|
||||||
|
# we need to save the instance here, due to the broken super.save method not saving the status field
|
||||||
|
# correctly & would require to posts on the data-source object
|
||||||
|
self.instance.save()
|
||||||
|
|
||||||
return super().save(*args, **kwargs)
|
return super().save(*args, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user