From 027fbb4ab31bbdcddbd65e69395b1fb2d0a47175 Mon Sep 17 00:00:00 2001 From: "Casper V. Kristensen" Date: Thu, 28 May 2020 04:30:27 +0200 Subject: [PATCH] Ensure no-responses and sign-offs are character-agnostic, in addition to already being role-agnostic. --- drakul/raids/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drakul/raids/models.py b/drakul/raids/models.py index a9265d7..48f5c89 100755 --- a/drakul/raids/models.py +++ b/drakul/raids/models.py @@ -114,8 +114,9 @@ class RaidResponse(models.Model): self._original_status = self.status def clean(self): - # Make sure no-responses and sign-offs are role-agnostic, but all other responses are not + # Make sure no-responses and sign-offs are character- and role-agnostic, but all other responses are not if self.status <= RaidResponse.Status.SIGNED_OFF: + self.character = self.character.user.main self.role = None elif self.role is None: raise ValidationError({"role": "This field is required."})