fix(parsers): align vacancy sources and procurement counters
This commit is contained in:
@@ -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",
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user