Skip to content
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.

Commit

Permalink
BAU: Only call progress endpoint if we have data (#127)
Browse files Browse the repository at this point in the history
* BAU: Only call progress endpoint if we have data

* BAU: Rename variable instead of mutating
  • Loading branch information
tferns authored Jan 11, 2023
1 parent eeafdea commit c1e76cf
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions app/assess/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,16 +233,17 @@ def landing():
assessment_deadline = get_round(
Config.COF_FUND_ID, Config.COF_ROUND2_ID
).assessment_deadline

# Updating assessment progress for applications
application_overviews = get_assessment_progress(
application_overviews
)


post_processed_overviews = (
get_assessment_progress(application_overviews)
if application_overviews
else []
)

return render_template(
"assessor_dashboard.html",
user=g.user,
application_overviews=application_overviews,
application_overviews=post_processed_overviews,
assessment_deadline=assessment_deadline,
query_params=search_params,
asset_types=asset_types,
Expand Down Expand Up @@ -344,6 +345,8 @@ def sub_crit_scoring():

@assess_bp.route("/file/<application_id>/<file_name>", methods=["GET"])
def get_file(application_id: str, file_name: str):
response = get_file_response(application_id=application_id, file_name=file_name)

return response
response = get_file_response(
application_id=application_id, file_name=file_name
)

return response

0 comments on commit c1e76cf

Please sign in to comment.