def _import(self, csv): import_type = self.import_type() request = self.create_csv_request(csv, type=import_type) context = start_import(request, self.instance) pk = context['table']['rows'][0].pk return pk
def _import(self, csv): import_type = self.import_type() request = self.create_csv_request(csv, type=import_type) context = start_import(request, self.instance) if import_type == TreeImportEvent.import_type: pk = context['active_trees'][0].pk else: pk = context['active_species'][0].pk return pk