mirror of
https://github.com/tildeverse/lobsters
synced 2024-06-14 21:16:37 +00:00
deleting + undeleting shouldn't allow users to save invalid stories
This commit is contained in:
parent
e112c58893
commit
18bc9b8ba9
|
@ -43,7 +43,7 @@ class StoriesController < ApplicationController
|
|||
@story.is_deleted = true
|
||||
@story.editor = @user
|
||||
|
||||
if @story.save(:validate => false)
|
||||
if @story.save
|
||||
Keystore.increment_value_for("user:#{@story.user.id}:stories_deleted")
|
||||
end
|
||||
|
||||
|
@ -232,7 +232,7 @@ class StoriesController < ApplicationController
|
|||
@story.is_deleted = false
|
||||
@story.editor = @user
|
||||
|
||||
if @story.save(:validate => false)
|
||||
if @story.save
|
||||
Keystore.increment_value_for("user:#{@story.user.id}:stories_deleted", -1)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user