Skip to content

Commit

Permalink
[#1770] Add secondary reporter
Browse files Browse the repository at this point in the history
  • Loading branch information
KasperBrandt committed Sep 29, 2015
1 parent 80e9007 commit 11e4266
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion akvo/iati/imports/iati_import_activity.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,14 @@ def set_sync_owner(self):
self.project, 1)
return False

if 'secondary-reporter' in reporting_org_element.attrib.keys():
if reporting_org_element.attrib['secondary-reporter'] == '1':
self.project.sync_owner_secondary_reporter = True
elif reporting_org_element.attrib['secondary-reporter'] == '0':
self.project.sync_owner_secondary_reporter = False

self.project.sync_owner = organisation
self.project.save()
self.project.save(update_fields=['sync_owner', 'sync_owner_secondary_reporter'])
return True

add_log(self.iati_import, 'reporting_org',
Expand Down

0 comments on commit 11e4266

Please sign in to comment.