fix: create organizations from form uploads
All checks were successful
All checks were successful
This commit is contained in:
@@ -366,7 +366,13 @@ class FormF2Parser(ReportingPeriodParserMixin, BaseExcelParser[FormF2Record]):
|
||||
"""Создать запись формы Ф-2."""
|
||||
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,
|
||||
)
|
||||
|
||||
record = FormF2Service.create_versioned_record(
|
||||
organization=org,
|
||||
|
||||
Reference in New Issue
Block a user