From 6b3c541a8ac062670fbe39c67c76bb32eab09c67 Mon Sep 17 00:00:00 2001 From: evazion Date: Tue, 4 Feb 2020 03:59:10 -0600 Subject: [PATCH] /ip_addresses: temp fix for exception when using group_by param. Calling next_page here raises an exception when calculating the page count because it can't handle SQL containing a GROUP BY clause. Swallow the exception as a temp fix. --- app/views/layouts/default.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/layouts/default.html.erb b/app/views/layouts/default.html.erb index f0abf5cee..9eaafc6f2 100644 --- a/app/views/layouts/default.html.erb +++ b/app/views/layouts/default.html.erb @@ -5,11 +5,11 @@ - <% if @current_item.try(:prev_page) %> + <% if (@current_item.try(:prev_page) rescue false) %> <%= tag.link rel: "prev", href: url_for(nav_params_for(@current_item.prev_page)) %> <% end %> - <% if @current_item.try(:next_page) %> + <% if (@current_item.try(:next_page) rescue false) %> <%= tag.link rel: "next", href: url_for(nav_params_for(@current_item.next_page)) %> <% end %>