Automatically set RaidResponse role to character's default role if not set by user.
This commit is contained in:
parent
be86354c1f
commit
dd7f45599d
|
@ -59,6 +59,12 @@ class RaidResponseForm(ModelForm):
|
|||
self.helper.form_show_labels = False
|
||||
self.helper.form_tag = False
|
||||
|
||||
def clean_role(self):
|
||||
role = self.cleaned_data["role"]
|
||||
if role is None:
|
||||
return self.cleaned_data["character"].role
|
||||
return role
|
||||
|
||||
|
||||
class RaidForm(ModelForm):
|
||||
class Meta:
|
||||
|
|
Loading…
Reference in a new issue