diff --git a/Gemfile.lock b/Gemfile.lock index d43718d5237..5f32f174f9c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -451,7 +451,7 @@ GEM rspec-core (>= 2.14) rtlcss (0.2.1) mini_racer (>= 0.6.3) - rubocop (1.66.1) + rubocop (1.67.0) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) diff --git a/app/controllers/topics_controller.rb b/app/controllers/topics_controller.rb index 3e85270ee61..cd4c1224f09 100644 --- a/app/controllers/topics_controller.rb +++ b/app/controllers/topics_controller.rb @@ -125,7 +125,7 @@ class TopicsController < ApplicationController deleted = guardian.can_see_topic?(ex.obj, false) || - (!guardian.can_see_topic?(ex.obj) && ex.obj&.access_topic_via_group && ex.obj&.deleted_at) + (!guardian.can_see_topic?(ex.obj) && ex.obj&.access_topic_via_group && ex.obj.deleted_at) if SiteSetting.detailed_404 if deleted @@ -990,7 +990,7 @@ class TopicsController < ApplicationController rescue Discourse::InvalidAccess => ex deleted = guardian.can_see_topic?(ex.obj, false) || - (!guardian.can_see_topic?(ex.obj) && ex.obj&.access_topic_via_group && ex.obj&.deleted_at) + (!guardian.can_see_topic?(ex.obj) && ex.obj&.access_topic_via_group && ex.obj.deleted_at) raise Discourse::NotFound.new( nil, diff --git a/script/import_scripts/jive_api.rb b/script/import_scripts/jive_api.rb index 7a84231b730..af22cd5343e 100644 --- a/script/import_scripts/jive_api.rb +++ b/script/import_scripts/jive_api.rb @@ -282,7 +282,7 @@ class ImportScripts::JiveApi < ImportScripts::Base post_id = post_id_from_imported_post_id(topic[:id]) parent_post = post_id ? Post.unscoped.find_by(id: post_id) : create_post(topic, topic[:id]) - if parent_post&.id && parent_post&.topic_id + if parent_post&.id && parent_post.topic_id resources = content["resources"] if content["likeCount"].to_i > 0 && resources.dig("likes", "ref").present? import_likes(resources["likes"]["ref"], parent_post.id)