feat: add parser source dashboard and scheduling
All checks were successful
CI/CD Pipeline / Code Quality Checks (pull_request) Successful in 1m55s
CI/CD Pipeline / Run Tests (pull_request) Successful in 3m6s
CI/CD Pipeline / Run API Inventory E2E Tests (pull_request) Successful in 2m48s
CI/CD Pipeline / Telegram Notify Success (pull_request) Successful in 19s

This commit is contained in:
2026-04-28 01:08:51 +02:00
parent 1249071a33
commit 26d61f7181
58 changed files with 7713 additions and 141 deletions

View File

@@ -8,6 +8,7 @@ They are easily testable and can manage transactions.
import logging
from typing import Any, Generic, TypeVar
import django
from apps.core.exceptions import NotFoundError
from django.db import models, transaction
from django.db.models import QuerySet
@@ -272,8 +273,13 @@ class BulkOperationsMixin:
"ignore_conflicts": ignore_conflicts,
}
# Django 4.1+ поддерживает update_conflicts
if update_conflicts and update_fields and unique_fields:
# Django 4.1+ поддерживает update_conflicts; проект закреплён на Django 3.x.
if (
django.VERSION >= (4, 1)
and update_conflicts
and update_fields
and unique_fields
):
kwargs["update_conflicts"] = True
kwargs["update_fields"] = update_fields
kwargs["unique_fields"] = unique_fields