Update domain.py

This commit is contained in:
zandercymatics 2024-02-12 13:13:24 -07:00
parent 0808a69b13
commit eb89ceb9f3
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7

View file

@ -791,10 +791,11 @@ class DomainInvitationDeleteView(DomainInvitationPermissionDeleteView, SuccessMe
object: DomainInvitation # workaround for type mismatch in DeleteView
def get_success_url(self):
messages.success(self.request, self.get_success_message())
return reverse("domain-users", kwargs={"pk": self.object.domain.id})
def get_success_message(self, cleaned_data):
return f"Successfully canceled invitation for {self.object.email}."
def get_success_message(self):
return f"Canceled invitation to {self.object.email}."
class DomainDeleteUserView(UserDomainRolePermissionDeleteView):