def test_set_activity_reporting_organisation(self): """ test update ActivityParticipatingOrganisation.organisation references to this organisation """ # create ActivityReportingOrganisation with ref this org, # organisation=None activity = ActivityFactory.create( iati_identifier='IATI-0001', iati_standard_version=self.version) ReportingOrganisationFactory.create( activity=activity, ref="org1", organisation=None ) # check if references are set after calling # set_activity_reporting_organisation post_save.set_activity_reporting_organisation(self.organisation) aro = ActivityReportingOrganisation.objects.all()[0] self.assertEqual(aro.organisation.id, self.organisation.id)
def post_save_models(self): """Perform all actions that need to happen after a single activity's been parsed.""" organisation = self.get_model('Organisation') if not organisation: return False post_save.set_activity_reporting_organisation(organisation)
def post_save_models(self): """Perform all actions that need to happen after a single organisation's been parsed.""" organisation = self.get_model('Organisation') if not organisation: return False post_save.set_activity_reporting_organisation(organisation) post_save.set_publisher_fk(organisation)
def post_save_models(self): """Perform all actions that need to happen after a single organisation's been parsed.""" organisation = self.get_model('Organisation') if not organisation: return False post_save.set_activity_reporting_organisation(organisation) post_save.set_publisher_fk(organisation) # Solr indexing OrganisationTaskIndexing(instance=organisation).run()