fix: align ci with organization redesign
Some checks failed
CI/CD Pipeline / Quality Gate (push) Failing after 18s
CI/CD Pipeline / Build and Push Images (push) Has been skipped
CI/CD Pipeline / Internal Notify (push) Successful in 0s
CI/CD Pipeline / Deploy Dev via Compose (push) Has been skipped

This commit is contained in:
2026-06-07 16:43:30 +02:00
parent 802257a757
commit 71eac688f2
10 changed files with 82 additions and 754 deletions

View File

@@ -260,7 +260,9 @@ class OrganizationDirectoryImportService:
if not row or row[0] is None:
continue
code = OrganizationDirectoryImportService._text(row[0])
value = OrganizationDirectoryImportService._text(row[1] if len(row) > 1 else "")
value = OrganizationDirectoryImportService._text(
row[1] if len(row) > 1 else ""
)
if code:
references[code] = value
return references
@@ -347,7 +349,9 @@ class OrganizationDirectoryImportService:
strict=True,
)
)
second_values = dict(zip(SOURCE_HEADERS, second_prefix + second_tail, strict=True))
second_values = dict(
zip(SOURCE_HEADERS, second_prefix + second_tail, strict=True)
)
if cls._text(second_values.get("is")) == cls._text(second_values.get("rn")):
second_values["is"] = ""
return [first_values, second_values]
@@ -360,10 +364,7 @@ class OrganizationDirectoryImportService:
rn: Any,
expected_count: int,
) -> list[Any]:
if (
len(values) == expected_count + 1
and cls._text(values[-2]) == cls._text(rn)
):
if len(values) == expected_count + 1 and cls._text(values[-2]) == cls._text(rn):
return [*values[:-2], values[-1]]
return values

View File

@@ -46,13 +46,16 @@ class OrganizationDirectoryResolver:
ogrn: object = None,
ogrip: object = None,
) -> OrganizationIdentity:
normalized_inn, normalized_kpp, normalized_ogrn, normalized_ogrip = (
normalize_identity_fields(
inn=inn,
kpp=kpp,
ogrn=ogrn,
ogrip=ogrip,
)
(
normalized_inn,
normalized_kpp,
normalized_ogrn,
normalized_ogrip,
) = normalize_identity_fields(
inn=inn,
kpp=kpp,
ogrn=ogrn,
ogrip=ogrip,
)
return OrganizationIdentity(
rn=cls._digits(rn, max_length=20),

View File

@@ -292,9 +292,11 @@ class OrganizationSourceIngestionService:
normalized_records: list[_NormalizedRecordInput],
) -> tuple[dict[int, Organization], int]:
"""Compatibility wrapper; parser ingestion must not create organizations."""
organizations, _skipped_unmatched, _skipped_ambiguous = (
cls._resolve_existing_organizations(normalized_records)
)
(
organizations,
_skipped_unmatched,
_skipped_ambiguous,
) = cls._resolve_existing_organizations(normalized_records)
return organizations, 0
@classmethod