From 46f3bff06569f06ce84799635ad25727cfd095b5 Mon Sep 17 00:00:00 2001 From: Lucas Di Pentima Date: Fri, 24 May 2019 14:58:59 -0300 Subject: [PATCH] 15275: Don't create snapshots whenever is_trashed is true. Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima --- services/api/app/models/collection.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/api/app/models/collection.rb b/services/api/app/models/collection.rb index 8dca6fc9fb..8ec4761df6 100644 --- a/services/api/app/models/collection.rb +++ b/services/api/app/models/collection.rb @@ -338,7 +338,7 @@ class Collection < ArvadosModel def should_preserve_version? return false unless (Rails.configuration.Collections.CollectionVersioning && versionable_updates?(self.changes.keys)) - return false if self.changes.keys.include?('is_trashed') && self.is_trashed_was == false + return false if self.is_trashed idle_threshold = Rails.configuration.Collections.PreserveVersionIfIdle if !self.preserve_version_was && -- 2.30.2