From a3081214ca01b8c8ae62997c3860527b2beb00be Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Wed, 25 Mar 2026 23:51:42 +0000 Subject: [PATCH] cleaning up inputs --- backend/engine/engine.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/engine/engine.py b/backend/engine/engine.py index 9bcb2ccd..5fd5eaf4 100644 --- a/backend/engine/engine.py +++ b/backend/engine/engine.py @@ -4,6 +4,7 @@ from copy import deepcopy from datetime import datetime import pandas as pd from uuid import UUID +from typing import List from tqdm import tqdm from sqlalchemy.exc import IntegrityError, OperationalError @@ -375,14 +376,13 @@ def get_funding_data(): return project_scores_matrix, partial_project_scores_matrix, whlg_eligible_postcodes -def check_duplicate_uprns(plan_input): +def check_duplicate_uprns(input_uprns: List[int]): """ Simple function to check if the input data contains duplicated UPRNS. If there are duplicates, an exception will be rasied :return: """ # Check for duplicate UPRNS - input_uprns = [x.get("uprn") for x in plan_input if "uprn" in x and x.get("uprn")] if input_uprns: # Check for dupes