Skip to content

Commit

Permalink
Merge pull request #8254 from scinote-eln/hotfix/1.39.1.2
Browse files Browse the repository at this point in the history
February 2025 Hotfix 2
  • Loading branch information
artoscinote authored Feb 18, 2025
2 parents 82fcfc8 + 1252e67 commit 28b223a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 17 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.39.1.1
1.39.1.2
2 changes: 1 addition & 1 deletion app/services/lists/base_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def order_params
end

def paginate_records
@records = @records.page(@params[:page]).per(@params[:per_page]) if @params[:page].present?
@records = @records.page(@params[:page]).per(@params[:per_page])
end

def sort_direction(order_params)
Expand Down
16 changes: 1 addition & 15 deletions app/services/user_data_deletion.rb
Original file line number Diff line number Diff line change
Expand Up @@ -112,20 +112,6 @@ def self.destroy_protocol(protocol)
end

def self.destroy_notifications(user)
# Find all notifications where user is the only reference
# on the notification, and destroy all such notifications
# (user_notifications are destroyed when notification is
# destroyed). We try to do this efficiently (hence in_groups_of).
nids_all = user.notifications.pluck(:id)
nids_all.in_groups_of(1000, false) do |nids|
Notification
.where(id: nids)
.joins(:user_notifications)
.group('notifications.id')
.having('count(notification_id) <= 1')
.destroy_all
end
# Now, simply destroy all user notification relations left
user.user_notifications.destroy_all
user.notifications.in_batches(of: 1000).destroy_all
end
end
2 changes: 2 additions & 0 deletions app/views/layouts/protocols/print.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
<head>
<title><%= t("protocols.print.title") %></title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<script src="<%= global_constants_path(format: :js) %>"></script>

<%= javascript_include_tag 'jquery_bundle' %>
<%= javascript_include_tag 'application' %>
<%= javascript_include_tag "handsontable.full" %>
Expand Down

0 comments on commit 28b223a

Please sign in to comment.