diff --git a/cadc-tap-schema/src/main/java/ca/nrc/cadc/vosi/actions/PutAction.java b/cadc-tap-schema/src/main/java/ca/nrc/cadc/vosi/actions/PutAction.java index f3827b85..d5766a1b 100644 --- a/cadc-tap-schema/src/main/java/ca/nrc/cadc/vosi/actions/PutAction.java +++ b/cadc-tap-schema/src/main/java/ca/nrc/cadc/vosi/actions/PutAction.java @@ -218,8 +218,6 @@ private void createTable(TapSchemaDAO ts, String schemaName, String tableName) t if (td != null) { throw new ResourceAlreadyExistsException("table " + tableName + " already exists"); } - // flag table as created using the API to allow table deletion in the DeleteAction - td.apiCreated = true; Profiler prof = new Profiler(PutAction.class); DatabaseTransactionManager tm = new DatabaseTransactionManager(ds); @@ -233,6 +231,8 @@ private void createTable(TapSchemaDAO ts, String schemaName, String tableName) t prof.checkpoint("create-table"); // add to tap_schema + // flag table as created using the API to allow table deletion in the DeleteAction + inputTable.apiCreated = true; ts.put(inputTable); prof.checkpoint("insert-into-tap-schema");