def iati_organisations__iati_organisation__recipient_country_budget( self, element): """atributes: tag:recipient-country-budget""" model = self.get_model('Organisation') recipient_country_budget = RecipientCountryBudget() recipient_country_budget.organisation = model self.register_model('RecipientCountryBudget', recipient_country_budget) # store element return element
def iati_organisations__iati_organisation__recipient_country_budget(self, element): """atributes: tag:recipient-country-budget""" status = self.get_or_none(codelist_models.BudgetStatus, code=element.attrib.get('status')) model = self.get_model('Organisation') recipient_country_budget = RecipientCountryBudget() recipient_country_budget.organisation = model if status: recipient_country_budget.status = status self.register_model('RecipientCountryBudget', recipient_country_budget) # store element return element