mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
cleaning up inputs
This commit is contained in:
parent
2da419df71
commit
a3081214ca
1 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue