architectonics 0.0.35__py3-none-any.whl → 0.0.36__py3-none-any.whl

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.
@@ -68,11 +68,11 @@ class BaseService:
68
68
  model_id: str,
69
69
  ) -> ServiceResult[BaseModel, BaseModelValidationErrors]:
70
70
 
71
- try:
72
- model = await self._repository.get_model_by_id(
73
- model_id=model_id,
74
- )
75
- except ObjectNotFoundException:
71
+ model = await self._repository.get_model_by_id(
72
+ model_id=model_id,
73
+ )
74
+
75
+ if model is None:
76
76
  return ServiceResult[BaseModel, BaseModelValidationErrors].failure(
77
77
  error_message="object_not_found",
78
78
  )
@@ -49,7 +49,7 @@ class BaseRepository(ABC):
49
49
  async def get_model_by_id(
50
50
  self,
51
51
  model_id: str,
52
- ) -> BaseModel:
52
+ ) -> BaseModel | None:
53
53
 
54
54
  statement = select(
55
55
  self._entity,
@@ -66,7 +66,7 @@ class BaseRepository(ABC):
66
66
  entity = result.scalars().first()
67
67
 
68
68
  if entity is None:
69
- raise ObjectNotFoundException()
69
+ return None
70
70
 
71
71
  return entity.to_model()
72
72
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: architectonics
3
- Version: 0.0.35
3
+ Version: 0.0.36
4
4
  Summary:
5
5
  Author: Your Name
6
6
  Author-email: you@example.com
@@ -13,7 +13,7 @@ architectonics/core/result/error_message.py,sha256=sMIMVt58wGo33E9lD4r6k9tRkgL2T
13
13
  architectonics/core/result/service_result.py,sha256=VwjegZKR38ocAEriY_0rnnPn69u09HDja4y3iKq0z9w,1879
14
14
  architectonics/core/schemas/base_schemas.py,sha256=4ghwg7h06uIoBRkXGtWDFQA7Yb6Hvo4AsIA80xmSlFk,415
15
15
  architectonics/core/services/base_schemas.py,sha256=9PpCcf5GaE68s2VDKiAWRNufhFL2iN5djOcMsir8HMk,295
16
- architectonics/core/services/base_service.py,sha256=hYYQ73icgMnwnDRjGd1rqYlE5qvsVvneKHosjEEHysU,4149
16
+ architectonics/core/services/base_service.py,sha256=dyu_G4JV9iL_teT10M9UhvGlN5D15165FABJRxcjWXU,4111
17
17
  architectonics/core/validation/base_model_validation_errors.py,sha256=Z3nGM3XaHbkW0z2qhVjwd8t0EbYULArIHARa0IYCNVg,306
18
18
  architectonics/infrastructure/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
19
19
  architectonics/infrastructure/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -22,7 +22,7 @@ architectonics/infrastructure/config/database_settings.py,sha256=d1HA8rQj3LMACEv
22
22
  architectonics/infrastructure/entities/base_entity.py,sha256=EqmmY2aVzqIdgJPsKBUBtesOfsmSSNrRuBGGQQ6bpJA,818
23
23
  architectonics/infrastructure/repositories/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
24
24
  architectonics/infrastructure/repositories/base_exceptions.py,sha256=kOeu3p90LHMxCcp2cCL_Anrsz4CTLtELWqma_RCQSqM,303
25
- architectonics/infrastructure/repositories/base_repository.py,sha256=y9Q2SPj1t55gRrUaNrSZ7SnuEGVYRAlwuU3fhNwtzt8,3585
26
- architectonics-0.0.35.dist-info/WHEEL,sha256=y3eDiaFVSNTPbgzfNn0nYn5tEn1cX6WrdetDlQM4xWw,83
27
- architectonics-0.0.35.dist-info/METADATA,sha256=xAEwbOoRpQui4bDEHoq492lae0wJ4ZrVXjEFseJtgpQ,469
28
- architectonics-0.0.35.dist-info/RECORD,,
25
+ architectonics/infrastructure/repositories/base_repository.py,sha256=RFERUHKTXCURSSME-GHkmBfbycSPTtiojYwBowjtNrw,3572
26
+ architectonics-0.0.36.dist-info/WHEEL,sha256=y3eDiaFVSNTPbgzfNn0nYn5tEn1cX6WrdetDlQM4xWw,83
27
+ architectonics-0.0.36.dist-info/METADATA,sha256=Q5ccHeslwrS2Zx2uio38U7A6NZYITN6n7pKhbH13utA,469
28
+ architectonics-0.0.36.dist-info/RECORD,,