Skip to content

Commit

Permalink
Cleaning up
Browse files Browse the repository at this point in the history
  • Loading branch information
kdp-cloud committed Nov 13, 2024
1 parent b9b5235 commit f68b44e
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/controllers/samples_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class SamplesController < ApplicationController
before_action :samples_enabled?
before_action :find_index_assets, only: :index
before_action :find_and_authorize_requested_item, except: [:index, :new, :create, :preview]
before_action :check_if_locked_sample_type, only: [:edit, :new]
before_action :check_if_locked_sample_type, only: %i[edit new create update]
before_action :templates_enabled?, only: [:query, :query_form]

before_action :auth_to_create, only: %i[new create batch_create]
Expand Down
2 changes: 1 addition & 1 deletion app/models/sample.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class Sample < ApplicationRecord

validates_with SampleAttributeValidator
validate :validate_added_linked_sample_permissions
validate :check_if_locked_sample_type, on: :create
validate :check_if_locked_sample_type, on: %i[create update]

before_validation :set_title_to_title_attribute_value
before_validation :update_sample_resource_links
Expand Down
1 change: 0 additions & 1 deletion test/functional/sample_types_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ class SampleTypesControllerTest < ActionController::TestCase
include AuthenticatedTestHelper

setup do
Rails.cache.clear
FactoryBot.create(:person) # to prevent person being first person and therefore admin
@person = FactoryBot.create(:project_administrator)
@project = @person.projects.first
Expand Down

0 comments on commit f68b44e

Please sign in to comment.