From 0c74f43cc249b860de91b0998efcc777e5674785 Mon Sep 17 00:00:00 2001 From: bedroesb Date: Wed, 19 Jan 2022 10:21:32 +0100 Subject: [PATCH] update table improvement --- ena_upload/ena_upload.py | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/ena_upload/ena_upload.py b/ena_upload/ena_upload.py index 59a1cf1..0f95eaf 100755 --- a/ena_upload/ena_upload.py +++ b/ena_upload/ena_upload.py @@ -983,23 +983,16 @@ def main(): print("There was an ERROR during submission:") sys.exit(receipt) - if action in ['ADD', 'MODIFY']: - if draft: - schema_dataframe = update_table_simple(schema_dataframe, - schema_targets, - action) - else: - schema_dataframe = update_table(schema_dataframe, + if action in ['ADD', 'MODIFY'] and not draft: + schema_dataframe = update_table(schema_dataframe, schema_targets, schema_update) - # save updates in new tables - save_update(schema_tables, schema_dataframe) - elif action in ['CANCEL', 'RELEASE']: + else: schema_dataframe = update_table_simple(schema_dataframe, schema_targets, action) - # save updates in new tables - save_update(schema_tables, schema_dataframe) + # save updates in new tables + save_update(schema_tables, schema_dataframe) if __name__ == "__main__":