train spam on state change to 'closed_spam'
This commit is contained in:
parent
737aa69024
commit
6ac300d737
3 changed files with 36 additions and 3 deletions
|
@ -60,6 +60,8 @@ class IssueThread(SoftDeleteModel):
|
|||
if self.state == value:
|
||||
return
|
||||
self.state_changes.create(state=value)
|
||||
if value == 'closed_spam' and self.emails.exists():
|
||||
self.emails.first().train_spam()
|
||||
|
||||
@property
|
||||
def assigned_to(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue