fix: collect sources for state corp corporations
All checks were successful
CI/CD Pipeline / Quality Gate (push) Successful in 32s
CI/CD Pipeline / Build and Push Images (push) Successful in 1s
CI/CD Pipeline / Internal Notify (push) Successful in 1s
CI/CD Pipeline / Deploy Dev via Compose (push) Successful in 1s
CI/CD Pipeline / Quality Gate (pull_request) Successful in 30s
CI/CD Pipeline / Build and Push Images (pull_request) Successful in 1s
CI/CD Pipeline / Internal Notify (pull_request) Successful in 1s
CI/CD Pipeline / Deploy Dev via Compose (pull_request) Successful in 1s
All checks were successful
CI/CD Pipeline / Quality Gate (push) Successful in 32s
CI/CD Pipeline / Build and Push Images (push) Successful in 1s
CI/CD Pipeline / Internal Notify (push) Successful in 1s
CI/CD Pipeline / Deploy Dev via Compose (push) Successful in 1s
CI/CD Pipeline / Quality Gate (pull_request) Successful in 30s
CI/CD Pipeline / Build and Push Images (pull_request) Successful in 1s
CI/CD Pipeline / Internal Notify (pull_request) Successful in 1s
CI/CD Pipeline / Deploy Dev via Compose (pull_request) Successful in 1s
This commit is contained in:
@@ -178,6 +178,17 @@ def _resolve_lookup_limit(
|
||||
return max(resolved, 0)
|
||||
|
||||
|
||||
def _rosatom_roscosmos_scope_query() -> Q:
|
||||
"""Вернуть условие принадлежности к контуру Росатома или Роскосмоса."""
|
||||
return (
|
||||
Q(gk_name__icontains="Росатом")
|
||||
| Q(gk_name__icontains="Роскосмос")
|
||||
| Q(gk_code__iexact="rosatom")
|
||||
| Q(gk_code__iexact="roscosmos")
|
||||
| Q(gk_code__iexact="roskosmos")
|
||||
)
|
||||
|
||||
|
||||
def _active_registry_lookup_targets(
|
||||
*,
|
||||
limit: int | None = None,
|
||||
@@ -186,7 +197,9 @@ def _active_registry_lookup_targets(
|
||||
organization_ids: list[str] | None = None,
|
||||
) -> list[RegistryLookupTarget]:
|
||||
"""Вернуть организации, которые сейчас состоят хотя бы в одном реестре."""
|
||||
queryset = SourceOrganization.objects.filter(opk_registry_membership=True)
|
||||
queryset = SourceOrganization.objects.filter(
|
||||
Q(opk_registry_membership=True) | _rosatom_roscosmos_scope_query()
|
||||
)
|
||||
if organization_ids is not None:
|
||||
queryset = queryset.filter(uid__in=organization_ids)
|
||||
if require_inn:
|
||||
@@ -3977,6 +3990,7 @@ def _active_fns_registry_inns(*, limit: int) -> list[str]:
|
||||
Q(opk_registry_membership=True)
|
||||
| Q(goz_participation=True)
|
||||
| ~Q(ropk_num="")
|
||||
| _rosatom_roscosmos_scope_query()
|
||||
)
|
||||
.exclude(inn="")
|
||||
.order_by("inn")
|
||||
|
||||
Reference in New Issue
Block a user