Fix Ruff import ordering for CI
Some checks failed
CI/CD Pipeline / Code Quality Checks (push) Successful in 1m53s
CI/CD Pipeline / Run Tests (push) Successful in 2m19s
CI/CD Pipeline / Build Docker Images (push) Successful in 3m26s
CI/CD Pipeline / Push to Gitea Registry (push) Failing after 20s
CI/CD Pipeline / Deploy to Server (push) Has been skipped
Some checks failed
CI/CD Pipeline / Code Quality Checks (push) Successful in 1m53s
CI/CD Pipeline / Run Tests (push) Successful in 2m19s
CI/CD Pipeline / Build Docker Images (push) Successful in 3m26s
CI/CD Pipeline / Push to Gitea Registry (push) Failing after 20s
CI/CD Pipeline / Deploy to Server (push) Has been skipped
This commit is contained in:
@@ -2,9 +2,6 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from django.contrib import admin
|
||||
from django.db.models import F, Prefetch
|
||||
|
||||
from apps.core.admin_paper_forms import PaperFormPreviewRendererMixin
|
||||
from apps.form_1.admin import FormF1RecordAdmin
|
||||
from apps.form_1.models import FormF1Record
|
||||
@@ -20,6 +17,8 @@ from apps.form_6.admin import FormF6RecordAdmin
|
||||
from apps.form_6.models import FormF6Record
|
||||
from apps.organization.models import Organization
|
||||
from apps.registers.models import Register, RegistryMembershipPeriod
|
||||
from django.contrib import admin
|
||||
from django.db.models import F, Prefetch
|
||||
|
||||
|
||||
class ActiveRegistryListFilter(admin.SimpleListFilter):
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
"""Root-level analytics routes."""
|
||||
|
||||
from django.urls import path
|
||||
|
||||
from apps.organization.analytics_views import AnalyticsDashboardView
|
||||
from django.urls import path
|
||||
|
||||
app_name = "organization_analytics"
|
||||
|
||||
|
||||
@@ -7,8 +7,6 @@ from collections.abc import Iterable
|
||||
from datetime import date
|
||||
from decimal import Decimal
|
||||
|
||||
from django.db.models import Avg, Case, Count, IntegerField, Sum, When
|
||||
|
||||
from apps.core.exceptions import NotFoundError
|
||||
from apps.form_1.models import FormF1Record
|
||||
from apps.form_2.models import FormF2Record
|
||||
@@ -18,6 +16,7 @@ from apps.form_5.models import FormF5Record
|
||||
from apps.form_6.models import FormF6Record
|
||||
from apps.organization.models import IndustryCluster, Organization
|
||||
from apps.organization.scope_utils import filter_queryset_by_scopes
|
||||
from django.db.models import Avg, Case, Count, IntegerField, Sum, When
|
||||
|
||||
ZERO = Decimal("0")
|
||||
THOUSAND = Decimal("1000")
|
||||
|
||||
@@ -2,11 +2,6 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from django.shortcuts import get_object_or_404
|
||||
from rest_framework.permissions import IsAuthenticated
|
||||
from rest_framework.response import Response
|
||||
from rest_framework.views import APIView
|
||||
|
||||
from apps.organization.analytics_services import (
|
||||
DashboardAnalyticsService,
|
||||
OrganizationAnalyticsService,
|
||||
@@ -21,6 +16,10 @@ from apps.organization.query_serializers import (
|
||||
PersonnelQuerySerializer,
|
||||
ProductsQuerySerializer,
|
||||
)
|
||||
from django.shortcuts import get_object_or_404
|
||||
from rest_framework.permissions import IsAuthenticated
|
||||
from rest_framework.response import Response
|
||||
from rest_framework.views import APIView
|
||||
|
||||
|
||||
class OrganizationAnalyticsBaseView(APIView):
|
||||
|
||||
@@ -5,10 +5,6 @@ API ViewSets для организаций.
|
||||
- OrganizationViewSet - frontend-facing read API for organizations.
|
||||
"""
|
||||
|
||||
from django.db.models import Prefetch
|
||||
from django_filters import rest_framework as filters
|
||||
from rest_framework.permissions import IsAuthenticated
|
||||
|
||||
from apps.core.viewsets import ClassicReadOnlyViewSet
|
||||
from apps.organization.models import Organization
|
||||
from apps.organization.scope_utils import filter_queryset_by_scopes
|
||||
@@ -17,6 +13,9 @@ from apps.organization.serializers import (
|
||||
OrganizationCatalogListSerializer,
|
||||
)
|
||||
from apps.registers.models import RegistryMembershipPeriod
|
||||
from django.db.models import Prefetch
|
||||
from django_filters import rest_framework as filters
|
||||
from rest_framework.permissions import IsAuthenticated
|
||||
|
||||
|
||||
class OrganizationFilter(filters.FilterSet):
|
||||
|
||||
@@ -9,11 +9,10 @@ from __future__ import annotations
|
||||
|
||||
import uuid
|
||||
|
||||
from django.db import models
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
from apps.core.mixins import TimestampMixin
|
||||
from apps.organization.scope_utils import scope_labels, scopes_from_registry_names
|
||||
from django.db import models
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
|
||||
class CorporationScope(models.TextChoices):
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
"""Query serializers for organization analytics endpoints."""
|
||||
|
||||
from rest_framework import serializers
|
||||
|
||||
from apps.organization.models import CorporationScope
|
||||
from rest_framework import serializers
|
||||
|
||||
|
||||
class DashboardQuerySerializer(serializers.Serializer):
|
||||
|
||||
@@ -6,10 +6,9 @@
|
||||
- frontend-facing serializers for organization catalog endpoints.
|
||||
"""
|
||||
|
||||
from rest_framework import serializers
|
||||
|
||||
from apps.organization.models import Organization
|
||||
from apps.registers.models import Register
|
||||
from rest_framework import serializers
|
||||
|
||||
|
||||
class OrganizationRegisterSerializer(serializers.ModelSerializer):
|
||||
|
||||
@@ -8,10 +8,9 @@
|
||||
import logging
|
||||
from typing import Any
|
||||
|
||||
from django.db import transaction
|
||||
|
||||
from apps.core.services import BaseService
|
||||
from apps.organization.models import Organization
|
||||
from django.db import transaction
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
"""URL маршруты для организаций."""
|
||||
|
||||
from django.urls import include, path
|
||||
from rest_framework.routers import DefaultRouter
|
||||
|
||||
from apps.organization.analytics_views import (
|
||||
OrganizationEconomicsView,
|
||||
OrganizationEquipmentView,
|
||||
@@ -13,6 +10,8 @@ from apps.organization.analytics_views import (
|
||||
OrganizationRiskProfileView,
|
||||
)
|
||||
from apps.organization.api import OrganizationViewSet
|
||||
from django.urls import include, path
|
||||
from rest_framework.routers import DefaultRouter
|
||||
|
||||
router = DefaultRouter()
|
||||
router.register("", OrganizationViewSet, basename="organization")
|
||||
|
||||
Reference in New Issue
Block a user