diff --git a/app/__main__.py b/app/__main__.py index 2ec21aba..43cff134 100644 --- a/app/__main__.py +++ b/app/__main__.py @@ -45,7 +45,7 @@ def list_commands(self, ctx: click.Context) -> list[str]: # Called by fetch-award* commands. -def _create_complete_application(session: Session, award_entry: dict[str, str]) -> None: +def _create_application(session: Session, award_entry: dict[str, str]) -> None: with handle_skipped_award(session, "Error creating application"): # Create the award. If it exists, skip this award. award = util.create_award_from_data_source(session, award_entry) @@ -133,7 +133,7 @@ def fetch_awards( "Source contract is missing required fields:" f" url={awards_response.url}, data={awards_response_json}" ) - _create_complete_application(session, entry) + _create_application(session, entry) index += 1 awards_response = data_access.get_new_awards(index, from_date, until_date) @@ -156,7 +156,7 @@ def fetch_award_by_id_and_supplier(award_id: str, supplier_id: str) -> None: return with contextmanager(get_db)() as session: - _create_complete_application(session, award_response_json[0]) + _create_application(session, award_response_json[0]) @app.command() diff --git a/app/models.py b/app/models.py index c8011b97..f2078300 100644 --- a/app/models.py +++ b/app/models.py @@ -656,7 +656,7 @@ class ApplicationBase(SQLModel): #: .. seealso:: :meth:`app.models.Application.days_waiting_for_lender` completed_in_days: int | None - #: The time at which the application was most recently overdue (reset once completed). + #: The time at which the application was most recently overdue (reset once approved). #: #: .. seealso:: :attr:`~app.settings.Settings.progress_to_remind_started_applications` overdued_at: datetime | None = Field(sa_column=Column(DateTime(timezone=True))) diff --git a/app/utils/statistics.py b/app/utils/statistics.py index 4a52f2bf..06d687e4 100644 --- a/app/utils/statistics.py +++ b/app/utils/statistics.py @@ -67,9 +67,7 @@ def get_general_statistics( Get general statistics about applications based on the provided parameters. This function retrieves general statistics about applications based on the provided start_date, end_date, and - lender_id (if available). The statistics include the count of applications received, approved, rejected, waiting - for information, in progress, average amount requested, average repayment period, count of overdue applications, - average processing time, and proportion of submitted applications out of the opt-in applications. + lender_id (if available). :param start_date: The start date for filtering applications. (default: None) :param end_date: The end date for filtering applications. (default: None)