Fix being able to appeal a strike unlimited times (#18529)

Peculiarity of the `has_one` association is that the convenience
creation method deletes the previous association even if the new
one is invalid
signup-info-prompt
Eugen Rochko 2022-05-26 22:08:12 +02:00 committed by GitHub
parent c4d2c39a75
commit 8a9acbe604
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -14,7 +14,8 @@ class AppealService < BaseService
private
def create_appeal!
@appeal = @strike.create_appeal!(
@appeal = Appeal.create!(
strike: @strike,
text: @text,
account: @strike.target_account
)