Commit 4bef74cc authored by Sean McGivern's avatar Sean McGivern

Fix duplicate model find query in UploadsController

UploadsActions memoizes the result of `#find_model` in `#model`. That
means that if we call `#find_model` first, we'll run the query twice. As
`#model` is memoized, we don't need the `before_action` at all anyway.
parent bec1492c
...@@ -20,7 +20,7 @@ class UploadsController < ApplicationController ...@@ -20,7 +20,7 @@ class UploadsController < ApplicationController
skip_before_action :authenticate_user! skip_before_action :authenticate_user!
before_action :upload_mount_satisfied? before_action :upload_mount_satisfied?
before_action :find_model before_action :model
before_action :authorize_access!, only: [:show] before_action :authorize_access!, only: [:show]
before_action :authorize_create_access!, only: [:create, :authorize] before_action :authorize_create_access!, only: [:create, :authorize]
before_action :verify_workhorse_api!, only: [:authorize] before_action :verify_workhorse_api!, only: [:authorize]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment