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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dplex
3
- Version: 0.2.0
3
+ Version: 0.2.2
4
4
  Summary:
5
5
  License-Expression: MIT
6
6
  License-File: LICENSE
@@ -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
- raise ValueError(
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=True))
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
- raise ValueError(
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)
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "dplex"
3
- version = "0.2.0"
3
+ version = "0.2.2"
4
4
  description = ""
5
5
  authors = [
6
6
  {name = "Igor Chesnokov",email = "front-gold@mail.ru"}
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes