diff --git a/Gemfile.lock b/Gemfile.lock index 368e4a65..9241fbd1 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -188,7 +188,7 @@ GEM csv mini_mime (>= 1.0.0) multi_xml (>= 0.5.2) - i18n (1.14.6) + i18n (1.14.7) concurrent-ruby (~> 1.0) inflection (1.0.0) io-console (0.8.0) @@ -523,7 +523,7 @@ GEM term-ansicolor (~> 1.7) thor (>= 0.20, < 2.0) parallel (1.26.3) - parser (3.3.6.0) + parser (3.3.7.0) ast (~> 2.4.1) racc parslet (2.0.0) @@ -631,7 +631,7 @@ GEM rspec-mocks (~> 3.13) rspec-support (~> 3.13) rspec-support (3.13.2) - rubocop (1.69.2) + rubocop (1.70.0) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) @@ -645,8 +645,8 @@ GEM parser (>= 3.3.1.0) rubocop-capybara (2.21.0) rubocop (~> 1.41) - rubocop-govuk (5.0.7) - rubocop (= 1.69.2) + rubocop-govuk (5.0.8) + rubocop (= 1.70.0) rubocop-ast (= 1.37.0) rubocop-capybara (= 2.21.0) rubocop-rails (= 2.28.0) @@ -705,7 +705,7 @@ GEM sync tzinfo (2.0.6) concurrent-ruby (~> 1.0) - unicode-display_width (3.1.3) + unicode-display_width (3.1.4) unicode-emoji (~> 4.0, >= 4.0.4) unicode-emoji (4.0.4) uri (0.13.1) diff --git a/app/controllers/anonymous_feedback/problem_reports_controller.rb b/app/controllers/anonymous_feedback/problem_reports_controller.rb index c2fc3ed1..002bec03 100644 --- a/app/controllers/anonymous_feedback/problem_reports_controller.rb +++ b/app/controllers/anonymous_feedback/problem_reports_controller.rb @@ -74,13 +74,9 @@ def mark_supplied_reports_as_reviewed_and_spam review_attrs = { reviewed: true, marked_as_spam: } - if problem_report.update(review_attrs) - true - else - false - end + problem_report.update!(review_attrs) end - rescue ActiveRecord::RecordNotFound + rescue ActiveRecord::RecordNotFound, ActiveRecord::RecordInvalid false end