1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Fixes #3032: Save assigned tags when creating a new secret

This commit is contained in:
Jeremy Stretch
2019-04-02 11:42:49 -04:00
parent d23ca041cf
commit 3602d5a84c
2 changed files with 3 additions and 0 deletions

View File

@@ -120,6 +120,8 @@ def secret_add(request, pk):
secret.plaintext = str(form.cleaned_data['plaintext'])
secret.encrypt(master_key)
secret.save()
form.save_m2m()
messages.success(request, "Added new secret: {}.".format(secret))
if '_addanother' in request.POST:
return redirect('dcim:device_addsecret', pk=device.pk)