Skip to content

Commit c7fc710

Browse files
committed
Fix query for hashed nav item urls
1 parent d0110da commit c7fc710

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/models/better_together/navigation_item.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def self.route_name_urls
100100
joins(join).where(combined_conditions)
101101
}
102102

103-
scope :excluding_hashed, -> { where.not('url ILIKE ?', '#%') }
103+
scope :excluding_hashed, -> { where.not('url ILIKE ? AND linkable_id IS NULL', '#%') }
104104

105105
def build_children(pages, navigation_area) # rubocop:todo Metrics/MethodLength
106106
pages.each_with_index do |page, index|

0 commit comments

Comments
 (0)