fix: exclude demo companies from state corp exchange
Some checks failed
CI/CD Pipeline / Quality Gate (push) Failing after 38s
CI/CD Pipeline / Build and Push Images (push) Has been skipped
CI/CD Pipeline / Deploy Dev via Compose (push) Has been skipped
CI/CD Pipeline / Internal Notify (push) Successful in 0s

This commit is contained in:
2026-07-22 14:23:04 +02:00
parent b4c67a6188
commit 991b08263f
2 changed files with 29 additions and 1 deletions

View File

@@ -35,6 +35,7 @@ from django.conf import settings
from django.db.models import Q
from django.utils import timezone
from organizations.models import Organization, OrganizationSourceRecord
from organizations.test_companies import TestCompanyDatasetService
class StateCorpExchangeError(ValueError):
@@ -289,7 +290,9 @@ class StateCorpExchangeService:
@classmethod
def _rosatom_roscosmos_queryset(cls):
queryset = Organization.objects.exclude(inn="")
queryset = Organization.objects.exclude(inn="").exclude(
uid__in=TestCompanyDatasetService.company_uids()
)
name_query = Q()
for keyword in cls.ROSATOM_ROSCOSMOS_GK_NAME_KEYWORDS:
name_query |= Q(gk_name__icontains=keyword)