fix: create organizations from form uploads
All checks were successful
All checks were successful
This commit is contained in:
@@ -148,7 +148,13 @@ class FormF5Parser(ReportingPeriodParserMixin, BaseExcelParser[FormF5Record]):
|
||||
) -> FormF5Record:
|
||||
row_data = self._normalize_row_data(row_data)
|
||||
batch_id = batch_id or getattr(self, "load_batch", self.get_next_batch_id())
|
||||
org = OrganizationService.get_required_by_inn(row_data.inn)
|
||||
org = OrganizationService.get_or_create_from_form_identifiers(
|
||||
name=row_data.organization_name,
|
||||
inn=row_data.inn,
|
||||
ogrn=row_data.ogrn,
|
||||
kpp=row_data.kpp,
|
||||
okpo=row_data.okpo,
|
||||
)
|
||||
return FormF5Service.create_versioned_record(
|
||||
organization=org,
|
||||
load_batch=batch_id,
|
||||
|
||||
Reference in New Issue
Block a user