From f19beea05a06f294580f1c1b5f4bba36bf52e0ca Mon Sep 17 00:00:00 2001 From: Brian Hayden Date: Mon, 8 Jan 2024 14:08:44 -0600 Subject: [PATCH] Use `update!` so we throw errors if de-publishing a study fails. --- lib/connectors/ctgov.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/connectors/ctgov.rb b/lib/connectors/ctgov.rb index 72e8ce6..65eb3da 100644 --- a/lib/connectors/ctgov.rb +++ b/lib/connectors/ctgov.rb @@ -101,7 +101,7 @@ def stray_trials(nct_ids = nil) def cleanup_stray_trials(nct_ids = nil) nct_ids ||= site_nct_ids - stray_trials(nct_ids).update(visible: false) + stray_trials(nct_ids).update!(visible: false) end def nct_ids_for_location(location, page_token = nil)