X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/5f915857cbb3620587f321514a065a73fd6ecc46..e77609d17994548cd5abed7a0d25517c10c73327:/services/api/app/models/arvados_model.rb diff --git a/services/api/app/models/arvados_model.rb b/services/api/app/models/arvados_model.rb index 12f729813b..83b9a6e104 100644 --- a/services/api/app/models/arvados_model.rb +++ b/services/api/app/models/arvados_model.rb @@ -298,14 +298,14 @@ class ArvadosModel < ApplicationRecord # Only include records where the owner is not trashed #sql_conds = "#{sql_table}.owner_uuid NOT IN (SELECT target_uuid FROM #{PERMISSION_VIEW} "+ # "WHERE trashed = 1) #{exclude_trashed_records}" - sql_conds = "#{sql_table}.owner_uuid NOT IN (SELECT * FROM trashed_groups) #{exclude_trashed_records}" + sql_conds = "#{sql_table}.owner_uuid NOT IN (SELECT group_uuid FROM trashed_groups where trash_at < clock_timestamp()) #{exclude_trashed_records}" end end else trashed_check = "" if !include_trash then #trashed_check = "AND trashed = 0" - trashed_check = "AND target_uuid NOT IN (SELECT * FROM trashed_groups)" + trashed_check = "AND target_uuid NOT IN (SELECT group_uuid FROM trashed_groups where trash_at < clock_timestamp())" end # Note: it is possible to combine the direct_check and