Skip to content

Commit

Permalink
fix get_or_create
Browse files Browse the repository at this point in the history
  • Loading branch information
nicokant committed Nov 14, 2023
1 parent 5b6dba9 commit eaa2bda
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def to_metadata(xml_path: pathlib.Path, dataset: Dataset):
if funding := project.find("funding"):
for org in funding.find_all("para"):
o, _ = Organization.objects.get_or_create(name=org.text)
org_role = OrganizationRole.objects.create(
org_role, _ = OrganizationRole.objects.get_or_create(
organization=o,
metadata=metadata,
role=OrganizationRole.RoleType.FUNDING,
Expand Down

0 comments on commit eaa2bda

Please sign in to comment.