diff options
-rw-r--r-- | app/policies/project_policy.rb | 2 | ||||
-rw-r--r-- | db/fixtures/development/03_project.rb | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/app/policies/project_policy.rb b/app/policies/project_policy.rb index e79bac6bee3..8bc0c936039 100644 --- a/app/policies/project_policy.rb +++ b/app/policies/project_policy.rb @@ -501,7 +501,7 @@ class ProjectPolicy < BasePolicy end def feature_available?(feature) - case project.project_feature.access_level(feature) + case project.project_feature&.access_level(feature) when ProjectFeature::DISABLED false when ProjectFeature::PRIVATE diff --git a/db/fixtures/development/03_project.rb b/db/fixtures/development/03_project.rb index 46018cf68aa..e3e2e9bf0a7 100644 --- a/db/fixtures/development/03_project.rb +++ b/db/fixtures/development/03_project.rb @@ -90,14 +90,14 @@ Sidekiq::Testing.inline! do # since the Sidekiq::Testing block has already exited. Force clearing # the `after_commit` queue to ensure the job is run now. project.send(:_run_after_commit_queue) - project.import_state.send(:_run_after_commit_queue) + project.import_state&.send(:_run_after_commit_queue) end if project.valid? && project.valid_repo? print '.' else - puts project.errors.full_messages - print 'F' + puts "F (#{project.name})" + project.errors.full_messages.each { |m| puts m.red } end end |