From 7ce2d1f2c01015826c74a14a423c398569639d84 Mon Sep 17 00:00:00 2001 From: Adam Date: Fri, 23 Aug 2024 12:20:26 +0100 Subject: [PATCH] patch import script paths --- app/blueprints/fund_builder/routes.py | 4 ++-- app/blueprints/self_serve/templates/index.html | 8 ++++---- app/import_config/README.md | 2 +- app/import_config/load_form_json.py | 2 +- tasks/test_data.py | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/blueprints/fund_builder/routes.py b/app/blueprints/fund_builder/routes.py index 4835340..046dd10 100644 --- a/app/blueprints/fund_builder/routes.py +++ b/app/blueprints/fund_builder/routes.py @@ -230,9 +230,9 @@ def create_export_files(round_id): round_short_name = get_round_by_id(round_id).short_name # Directory to zip - directory_to_zip = f"app/export/config_generator/output/{round_short_name}/" + directory_to_zip = f"app/export_config/output/{round_short_name}/" # Output zip file path (temporary) - output_zip_path = f"app/export/config_generator/output/{round_short_name}.zip" + output_zip_path = f"app/export_config/output/{round_short_name}.zip" # Create a zip archive of the directory shutil.make_archive(output_zip_path.replace(".zip", ""), "zip", directory_to_zip) diff --git a/app/blueprints/self_serve/templates/index.html b/app/blueprints/self_serve/templates/index.html index b3f3003..fa7fdbf 100644 --- a/app/blueprints/self_serve/templates/index.html +++ b/app/blueprints/self_serve/templates/index.html @@ -19,18 +19,18 @@

What do you want to do?

-

Template Management

+

Template Management (post PoC)

-

Fund Configuration

+

Fund Configuration (PoC)

  • Add a Fund
  • Add a Round
  • diff --git a/app/import_config/README.md b/app/import_config/README.md index 61988d9..cbf4cb3 100644 --- a/app/import_config/README.md +++ b/app/import_config/README.md @@ -10,4 +10,4 @@ To import a form JSON, each file should be places in the following directory: The import can be triggered manually by running the following command: - python app/import_config/import_config.py + python app/import_config/load_form_json.py diff --git a/app/import_config/load_form_json.py b/app/import_config/load_form_json.py index ea369e7..de4f21f 100644 --- a/app/import_config/load_form_json.py +++ b/app/import_config/load_form_json.py @@ -201,7 +201,7 @@ def read_json_from_directory(directory_path): return form_configs -def load_form_jsons(override_fund_config): +def load_form_jsons(override_fund_config=None): db = app.extensions["sqlalchemy"] # Move db definition here try: if not override_fund_config: diff --git a/tasks/test_data.py b/tasks/test_data.py index a3300aa..beae4d5 100644 --- a/tasks/test_data.py +++ b/tasks/test_data.py @@ -69,7 +69,7 @@ def init_salmon_fishing_fund(): fund_id=f.fund_id, audit_info={"user": "dummy_user", "timestamp": datetime.now().isoformat(), "action": "create"}, title_json={"en": "round the first"}, - short_name=f"R{randint(0,999)}", + short_name="TEST", opens=datetime.now(), deadline=datetime.now(), assessment_start=datetime.now(),