From d838421cee66f765fb1348020a486284d4ad4444 Mon Sep 17 00:00:00 2001 From: shoulinwei Date: Tue, 22 Jun 2021 17:14:48 +0800 Subject: [PATCH] updateheader --- csst_dfs_api_local/common/ingest.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/csst_dfs_api_local/common/ingest.py b/csst_dfs_api_local/common/ingest.py index 5ea9079..37f9245 100644 --- a/csst_dfs_api_local/common/ingest.py +++ b/csst_dfs_api_local/common/ingest.py @@ -90,8 +90,8 @@ def ingesst_one(file_path, db, copyfiles): #level0-header ra_obj = header["RA_OBJ"] dec_obj = header["DEC_OBJ"] - - c = db.execute("insert into t_level0_header \ + db.execute("delete from t_level0_header where id=?",(level0_id,)) + db.execute("insert into t_level0_header \ (id, obs_time, exp_time, ra, `dec`, create_time) \ values (?,?,?,?,?,?)", (level0_id, exp_start_time, exp_time, ra_obj, dec_obj, create_time)) -- GitLab