Skip to content

Commit

Permalink
Fixes #4927: Fix validation error when updating an existing secret
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremystretch committed Jul 30, 2020
1 parent 24cedab commit 712e850
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/release-notes/version-2.8.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* [#4894](https://github.com/netbox-community/netbox/issues/4894) - Fix display of device/VM counts on platforms list
* [#4895](https://github.com/netbox-community/netbox/issues/4895) - Force UTF-8 encoding when embedding model documentation
* [#4910](https://github.com/netbox-community/netbox/issues/4910) - Unpin redis dependency to fix exception in RQ worker
* [#4927](https://github.com/netbox-community/netbox/issues/4927) - Fix validation error when updating an existing secret
* [#4929](https://github.com/netbox-community/netbox/issues/4929) - Correct log message when creating a new object

---
Expand Down
2 changes: 1 addition & 1 deletion netbox/secrets/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def clean(self):
device=self.cleaned_data['device'],
role=self.cleaned_data['role'],
name=self.cleaned_data['name']
).exists():
).exclude(pk=self.instance.pk).exists():
raise forms.ValidationError(
"Each secret assigned to a device must have a unique combination of role and name"
)
Expand Down

0 comments on commit 712e850

Please sign in to comment.