Skip to content

Commit ea5dce1

Browse files
Merge pull request #2300 from IFRCGo/fix/fts-hpc-issue
Fix fts-hpc source issue in databank
2 parents fba1803 + da617f6 commit ea5dce1

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

databank/management/commands/sources/FTS_HPC.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def prefetch():
3131
f"{d['Country #country+code'].upper()}-{d['Year #date+year']}": {
3232
"people_in_need": d["PIN #inneed"],
3333
"people_targeted": d["PT #targeted"],
34-
"funding_total_usd": d["Funding #value+funding+total+usd"],
34+
"funding_total_usd": d["Funding #value+required+total+usd"],
3535
"funding_required_usd": d["Requirements #value+funding+required+usd"],
3636
}
3737
for d in g_sheet_data

per/drf_views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ def get(self, request, pk, format=None):
354354
"Benchmark descprition",
355355
"Benchmark answer (Yes/No/Partially)",
356356
"Benchmark notes",
357-
"Consideration notes epi",
357+
"Consideration notes epidemic",
358358
"Consideration notes urban",
359359
"Consideration notes climate",
360360
"Component rating",

per/ops_learning_summary.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -897,7 +897,10 @@ def secondary_response_save_to_db(
897897
subtype = value["subtype"].strip()
898898
content = value["content"].strip()
899899
excerpt_ids = value["excerpts id"]
900-
excerpt_id_list = list(set(int(id.strip()) for id in excerpt_ids.split(",") if excerpt_ids != ""))
900+
if isinstance(excerpt_ids, list):
901+
excerpt_id_list = list(set(excerpt_ids if excerpt_ids else []))
902+
else:
903+
excerpt_id_list = list(set(int(id.strip()) for id in excerpt_ids.split(",") if excerpt_ids and excerpt_ids != ""))
901904

902905
if type == "component" and len(excerpt_id_list) > 0:
903906
cls.add_used_ops_learnings_component(

0 commit comments

Comments
 (0)