Browse Source
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
closed-social-glitch-2
Eugen Rochko
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
1 deletions
-
app/services/appeal_service.rb
|
@ -14,7 +14,8 @@ class AppealService < BaseService |
|
|
private |
|
|
private |
|
|
|
|
|
|
|
|
def create_appeal! |
|
|
def create_appeal! |
|
|
@appeal = @strike.create_appeal!( |
|
|
|
|
|
|
|
|
@appeal = Appeal.create!( |
|
|
|
|
|
strike: @strike, |
|
|
text: @text, |
|
|
text: @text, |
|
|
account: @strike.target_account |
|
|
account: @strike.target_account |
|
|
) |
|
|
) |
|
|