mirror of
https://github.com/kikobar/mastodon.git
synced 2024-12-26 15:54:23 +00:00
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
This commit is contained in:
parent
c4d2c39a75
commit
8a9acbe604
|
@ -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
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue