fix(parsers): align vacancy sources and procurement counters
All checks were successful
CI/CD Pipeline / Quality Gate (push) Successful in 29s
CI/CD Pipeline / Build and Push Images (push) Successful in 10s
CI/CD Pipeline / Internal Notify (push) Successful in 0s
CI/CD Pipeline / Deploy Dev in Dokploy (push) Successful in 1s

This commit is contained in:
2026-05-14 14:45:58 +02:00
parent 89607356b7
commit 6d1ec2e55c
12 changed files with 340 additions and 57 deletions

View File

@@ -7,6 +7,7 @@ from collections.abc import Iterable
from dataclasses import dataclass
from apps.parsers.models import (
VACANCY_RECORD_SOURCES,
FinancialReport,
GenericParserRecord,
IndustrialCertificateRecord,
@@ -273,8 +274,16 @@ class OrganizationDataSnapshotRefreshService:
ParserLoadLog.Source.FSTEC,
ParserLoadLog.Source.TRUDVSEM,
}:
sources = (
VACANCY_RECORD_SOURCES
if source == ParserLoadLog.Source.TRUDVSEM
else (source,)
)
return _identity_values(
GenericParserRecord.objects.filter(source=source, load_batch=batch_id),
GenericParserRecord.objects.filter(
source__in=sources,
load_batch=batch_id,
),
inn_field="inn",
ogrn_field="ogrn",
)