Skip to content
Snippets Groups Projects
Unverified Commit 5ec9e974 authored by Pinar Alper's avatar Pinar Alper Committed by GitHub
Browse files

Merge pull request #186 from elixir-luxembourg/185-Error-when-exporting-Contracts-to-Excel

null check added- fixes 185
parents 89789280 b3ecd1e9
No related branches found
Tags 1.4.0
No related merge requests found
......@@ -140,7 +140,7 @@ class Contract(CoreModel):
'project': self.project,
'local_custodians': contact_dicts,
'OTHER_DATA': 'See models/contract.py'
# TODO: Some fields are missing, this might need to be continuted
# TODO: Some fields are missing, this might need to be continued
}
return base_dict
......@@ -150,7 +150,9 @@ class Contract(CoreModel):
d = self.to_dict()
local_custodians = map(lambda v: f"[{v['first_name']} {v['last_name']}, {v['email']}]", d['local_custodians'])
d['local_custodians'] = ','.join(local_custodians)
d['project'] = d['project'].title
if 'project' in d and d['project']:
d['project'] = d['project'].title
return d
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment