Commit 949f4b46 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 bd024427
...@@ -20,7 +20,6 @@ class UploadsController < ApplicationController ...@@ -20,7 +20,6 @@ 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 :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