dplex 0.2.0__tar.gz → 0.2.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {dplex-0.2.0 → dplex-0.2.2}/PKG-INFO +1 -1
- {dplex-0.2.0 → dplex-0.2.2}/dplex/dp_repo.py +1 -6
- {dplex-0.2.0 → dplex-0.2.2}/dplex/dp_service.py +2 -4
- {dplex-0.2.0 → dplex-0.2.2}/pyproject.toml +1 -1
- {dplex-0.2.0 → dplex-0.2.2}/LICENSE +0 -0
- {dplex-0.2.0 → dplex-0.2.2}/README.md +0 -0
- {dplex-0.2.0 → dplex-0.2.2}/dplex/__init__.py +0 -0
- {dplex-0.2.0 → dplex-0.2.2}/dplex/dp_filters.py +0 -0
- {dplex-0.2.0 → dplex-0.2.2}/dplex/internal/filter_applier.py +0 -0
- {dplex-0.2.0 → dplex-0.2.2}/dplex/internal/filters.py +0 -0
- {dplex-0.2.0 → dplex-0.2.2}/dplex/internal/query_builder.py +0 -0
- {dplex-0.2.0 → dplex-0.2.2}/dplex/internal/sort.py +0 -0
- {dplex-0.2.0 → dplex-0.2.2}/dplex/internal/types.py +0 -0
- {dplex-0.2.0 → dplex-0.2.2}/dplex/py.typed +0 -0
|
@@ -351,14 +351,9 @@ class DPRepo[ModelType, KeyType]:
|
|
|
351
351
|
|
|
352
352
|
Returns:
|
|
353
353
|
Список созданных экземпляров модели
|
|
354
|
-
|
|
355
|
-
Raises:
|
|
356
|
-
ValueError: Если список entities пустой
|
|
357
354
|
"""
|
|
358
355
|
if not entities:
|
|
359
|
-
|
|
360
|
-
"DPRepo.create_bulk: Список для создания не может быть пустым"
|
|
361
|
-
)
|
|
356
|
+
return []
|
|
362
357
|
|
|
363
358
|
self.session.add_all(entities)
|
|
364
359
|
return entities
|
|
@@ -87,7 +87,7 @@ class DPService[
|
|
|
87
87
|
Returns:
|
|
88
88
|
Новый экземпляр SQLAlchemy модели
|
|
89
89
|
"""
|
|
90
|
-
return self.repository.model(**schema.model_dump(exclude_unset=
|
|
90
|
+
return self.repository.model(**schema.model_dump(exclude_unset=False))
|
|
91
91
|
|
|
92
92
|
def _apply_filter_to_query(
|
|
93
93
|
self, query_builder: "QueryBuilder[ModelType]", filter_data: FilterSchemaType
|
|
@@ -523,9 +523,7 @@ class DPService[
|
|
|
523
523
|
Список схем ответа с созданными сущностями
|
|
524
524
|
"""
|
|
525
525
|
if not create_data_list:
|
|
526
|
-
|
|
527
|
-
"DPService.create_bulk: Список для создания не может быть пустым"
|
|
528
|
-
)
|
|
526
|
+
return []
|
|
529
527
|
|
|
530
528
|
models = [self._create_schema_to_model(data) for data in create_data_list]
|
|
531
529
|
created_models = await self.repository.create_bulk(models)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|