[ARVADOS] updated: 1.2.0-244-g89acce74a

Git user git at public.curoverse.com
Thu Oct 18 19:20:48 EDT 2018


Summary of changes:
 services/api/app/models/arvados_model.rb | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

       via  89acce74a910f7e3a723ea1d7d21f7b51e61ed7d (commit)
      from  0d9d68f8a6c0a6593814f5610b611847de5004ac (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 89acce74a910f7e3a723ea1d7d21f7b51e61ed7d
Author: Lucas Di Pentima <ldipentima at veritasgenetics.com>
Date:   Thu Oct 18 20:20:19 2018 -0300

    13561: Code cleanup.
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <ldipentima at veritasgenetics.com>

diff --git a/services/api/app/models/arvados_model.rb b/services/api/app/models/arvados_model.rb
index 1e90ef602..cc15a56f3 100644
--- a/services/api/app/models/arvados_model.rb
+++ b/services/api/app/models/arvados_model.rb
@@ -269,11 +269,6 @@ class ArvadosModel < ActiveRecord::Base
       exclude_trashed_records = "AND #{sql_table}.is_trashed = false"
     end
 
-    exclude_old_versions = ""
-    if !include_old_versions && sql_table == "collections"
-      exclude_old_versions = "AND #{sql_table}.uuid = #{sql_table}.current_version_uuid"
-    end
-
     if users_list.select { |u| u.is_admin }.any?
       # Admin skips most permission checks, but still want to filter on trashed items.
       if !include_trash
@@ -322,11 +317,12 @@ class ArvadosModel < ActiveRecord::Base
 
     end
 
-    if exclude_old_versions != ""
+    if !include_old_versions && sql_table == "collections"
+      exclude_old_versions = "#{sql_table}.uuid = #{sql_table}.current_version_uuid"
       if sql_conds.nil?
-        sql_conds = exclude_old_versions[4..-1] # Remove "AND "
+        sql_conds = exclude_old_versions
       else
-        sql_conds += " #{exclude_old_versions}"
+        sql_conds += " AND #{exclude_old_versions}"
       end
     end
 

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list