Raise a validation error if a credential is set while the service is not

This commit is contained in:
Jeff Bradberry
2019-09-24 17:27:19 -04:00
parent efe4ea6575
commit a4873d97d8
3 changed files with 64 additions and 6 deletions

View File

@@ -530,7 +530,7 @@ class WebhookTemplateMixin(models.Model):
self.webhook_key = ''
if update_fields and 'webhook_service' in update_fields:
update_fields.append('webhook_key')
update_fields.add('webhook_key')
super().save(*args, **kwargs)