Skip to content

Commit 6a4e662

Browse files
committed
NSIA, ESF, CBF changes
1 parent 47e364a commit 6a4e662

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

api/management/commands/ingest_ns_initiatives.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ def handle(self, *args, **kwargs):
5858
"Categories",
5959
"AllocationInCHF",
6060
"FundingPeriodInMonths",
61-
"FundingType", # ?
62-
"FundingPeriodInYears", # ?
61+
"FundingType",
62+
"FundingPeriodInYears",
6363
],
6464
)
6565
funding_data = funding_data.replace({np.nan: None})
@@ -71,12 +71,12 @@ def handle(self, *args, **kwargs):
7171
nsd_initiatives, created = NSDInitiatives.objects.get_or_create(
7272
country=country,
7373
year=data[1],
74-
fund_type=data[2],
74+
fund_type=f"{data[2]} ({data[7]})" if data[7] else data[2],
7575
defaults={
7676
"title": data[3],
7777
"categories": data[4],
7878
"allocation": data[5],
79-
"funding_period": data[6],
79+
"funding_period": data[6] if data[6] else data[8] * 12,
8080
},
8181
)
8282
if not created:

0 commit comments

Comments
 (0)