Skip to content

Commit

Permalink
patch import script paths
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam-W1 committed Aug 23, 2024
1 parent 15f07ec commit 7ce2d1f
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions app/blueprints/fund_builder/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
8 changes: 4 additions & 4 deletions app/blueprints/self_serve/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,18 @@
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
<h1 class="govuk-heading-m">What do you want to do?</h1>
<h2 class="govuk-heading-s">Template Management</h2>
<h2 class="govuk-heading-s">Template Management (post PoC)</h2>
<ul class="govuk-body">
<li class="govuk-body"><a class="govuk-link" href="/">Edit a
template Question (text only)</a></li>
<li class="govuk-body"><a class="govuk-link" href="{{ url_for('self_serve_bp.form')}}">Create a template
Application Form</a></li>
<li class="govuk-body"><a class="govuk-link" href="/">Edit a template
Application Form (text only)</a></li>
<li class="govuk-body"><a class="govuk-link" href="{{ url_for('self_serve_bp.section')}}">Create a
template Section (Form group)</a></li>
<li class="govuk-body"><a class="govuk-link" href="/">Edit a
template Section</a></li>
</ul>
<h2 class="govuk-heading-s">Fund Configuration</h2>
<h2 class="govuk-heading-s">Fund Configuration (PoC)</h2>
<ul class="govuk-body">
<li class="govuk-body"><a class="govuk-link" href="{{url_for('build_fund_bp.fund')}}">Add a Fund</a></li>
<li class="govuk-body"><a class="govuk-link" href="{{url_for('build_fund_bp.round')}}">Add a Round</a></li>
Expand Down
2 changes: 1 addition & 1 deletion app/import_config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion app/import_config/load_form_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion tasks/test_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit 7ce2d1f

Please sign in to comment.