diff --git a/Gemfile.lock b/Gemfile.lock index 6964ec415..1627e9eac 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -292,7 +292,7 @@ GEM activerecord (>= 5.a) database_cleaner-core (~> 2.0.0) database_cleaner-core (2.0.1) - date (3.3.4) + date (3.4.1) debug_inspector (1.1.0) deface (1.9.0) actionview (>= 5.2) @@ -454,7 +454,7 @@ GEM rails (>= 3.2.0) net-http (0.4.1) uri - net-imap (0.4.17) + net-imap (0.4.19) date net-protocol net-pop (0.1.2) @@ -551,7 +551,7 @@ GEM nio4r (~> 2.0) raabro (1.4.0) racc (1.8.1) - rack (2.2.10) + rack (2.2.11) rack-attack (6.6.1) rack (>= 1.0, < 3) rack-cors (2.0.2) @@ -728,7 +728,7 @@ GEM thor (1.3.1) tilt (2.4.0) timecop (0.9.6) - timeout (0.4.1) + timeout (0.4.3) turbolinks (5.2.1) turbolinks-source (~> 5.2) turbolinks-source (5.2.0) diff --git a/VERSION b/VERSION index f1e40e814..f50159248 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.39.1.1 +1.39.1.2 diff --git a/app/services/user_data_deletion.rb b/app/services/user_data_deletion.rb index fef2dc995..f4270a45a 100644 --- a/app/services/user_data_deletion.rb +++ b/app/services/user_data_deletion.rb @@ -112,20 +112,6 @@ class UserDataDeletion 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 diff --git a/app/views/layouts/protocols/print.html.erb b/app/views/layouts/protocols/print.html.erb index e3a74b6c8..fe823208a 100644 --- a/app/views/layouts/protocols/print.html.erb +++ b/app/views/layouts/protocols/print.html.erb @@ -3,6 +3,8 @@ <%= t("protocols.print.title") %> + + <%= javascript_include_tag 'jquery_bundle' %> <%= javascript_include_tag 'application' %> <%= javascript_include_tag "handsontable.full" %> diff --git a/yarn.lock b/yarn.lock index e3d3a6b6a..e0685d211 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2809,9 +2809,9 @@ electron-to-chromium@^1.5.4: integrity sha512-lbBcvtIJ4J6sS4tb5TLp1b4LyfCdMkwStzXPyAgVgTRAsep4bvrAGaBOP7ZJtQMNJpSQ9SqG4brWOroNaQtm7Q== elliptic@^6.5.3, elliptic@^6.5.4: - version "6.6.0" - resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.6.0.tgz#5919ec723286c1edf28685aa89261d4761afa210" - integrity sha512-dpwoQcLc/2WLQvJvLRHKZ+f9FgOdjnq11rurqwekGQygGPsYSK29OMMD2WalatiqQ+XGFDglTNixpPfI+lpaAA== + version "6.6.1" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.6.1.tgz#3b8ffb02670bf69e382c7f65bf524c97c5405c06" + integrity sha512-RaddvvMatK2LJHqFJ+YA4WysVN5Ita9E35botqIYspQ4TkRAlCicdzKOjlyv/1Za5RyTNn7di//eEV0uTAfe3g== dependencies: bn.js "^4.11.9" brorand "^1.1.0" @@ -5322,9 +5322,9 @@ semver@^7.6.3: integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A== serialize-javascript@^6.0.0, serialize-javascript@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.1.tgz#b206efb27c3da0b0ab6b52f48d170b7996458e5c" - integrity sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w== + version "6.0.2" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.2.tgz#defa1e055c83bf6d59ea805d8da862254eb6a6c2" + integrity sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g== dependencies: randombytes "^2.1.0" @@ -5695,6 +5695,7 @@ tinycolor2@^1.4.1: version "1.6.0" resolved "https://registry.yarnpkg.com/tinycolor2/-/tinycolor2-1.6.0.tgz#f98007460169b0263b97072c5ae92484ce02d09e" integrity sha512-XPaBkWQJdsf3pLKJV9p4qN/S+fm2Oj8AIPo1BTUhg5oxkvm9+SVEGFdhyOz7tTdUTfvxMiAs4sp6/eZO2Ew+pw== + tinymce@^6.8.5: version "6.8.5" resolved "https://registry.yarnpkg.com/tinymce/-/tinymce-6.8.5.tgz#aa9a711c4e0b59d506dd281bade857d35a7b3c59"