mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 07:53:49 +08:00
FIX: Return a 404 when the draft_key
is missing
Previously if `draft_key` was missing you'd get a 500 error in the logs.
This commit is contained in:
@ -11,6 +11,8 @@ class DraftController < ApplicationController
|
||||
end
|
||||
|
||||
def update
|
||||
raise Discourse::NotFound.new if params[:draft_key].blank?
|
||||
|
||||
sequence =
|
||||
begin
|
||||
Draft.set(
|
||||
|
Reference in New Issue
Block a user