GeneralManager 0.11.1__py3-none-any.whl → 0.11.2__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.
@@ -17,12 +17,12 @@ modelsModel = TypeVar("modelsModel", bound=models.Model)
17
17
  def getFullCleanMethode(model: Type[models.Model]) -> Callable[..., None]:
18
18
  """
19
19
  Return a custom `full_clean` method for a Django model that performs both standard validation and additional rule-based checks.
20
-
20
+
21
21
  The generated method first applies Django's built-in model validation, then evaluates custom rules defined in the model's `_meta.rules` attribute. If any validation or rule fails, it raises a `ValidationError` containing all collected errors.
22
-
22
+
23
23
  Parameters:
24
24
  model (Type[models.Model]): The Django model class for which to generate the custom `full_clean` method.
25
-
25
+
26
26
  Returns:
27
27
  Callable[..., None]: A `full_clean` method that can be assigned to the model class.
28
28
  """
@@ -30,7 +30,7 @@ def getFullCleanMethode(model: Type[models.Model]) -> Callable[..., None]:
30
30
  def full_clean(self: models.Model, *args: Any, **kwargs: Any):
31
31
  """
32
32
  Performs full validation on the model instance, including both standard Django validation and custom rule-based checks.
33
-
33
+
34
34
  Aggregates errors from Django's built-in validation and any additional rules defined in the model's `_meta.rules` attribute. Raises a `ValidationError` containing all collected errors if any validation or rule check fails.
35
35
  """
36
36
  errors: dict[str, Any] = {}
@@ -41,7 +41,7 @@ def getFullCleanMethode(model: Type[models.Model]) -> Callable[..., None]:
41
41
 
42
42
  rules: list[Rule] = getattr(self._meta, "rules")
43
43
  for rule in rules:
44
- if not rule.evaluate(self):
44
+ if rule.evaluate(self) is False:
45
45
  error_message = rule.getErrorMessage()
46
46
  if error_message:
47
47
  errors.update(error_message)
@@ -78,7 +78,7 @@ class GeneralManagerModel(GeneralManagerBasisModel):
78
78
  def _history_user(self, value: AbstractUser) -> None:
79
79
  """
80
80
  Set the user responsible for the most recent change to the model instance.
81
-
81
+
82
82
  Parameters:
83
83
  value (AbstractUser): The user to associate with the latest modification.
84
84
  """
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: GeneralManager
3
- Version: 0.11.1
3
+ Version: 0.11.2
4
4
  Summary: Modular Django-based data management framework with ORM, GraphQL, fine-grained permissions, rule validation, calculations and caching.
5
5
  Author-email: Tim Kleindick <tkleindick@yahoo.de>
6
6
  License-Expression: MIT
@@ -21,7 +21,7 @@ general_manager/interface/baseInterface.py,sha256=cFsDU-nhj_O6Gir3eO0ukGKNn9Pplh
21
21
  general_manager/interface/calculationInterface.py,sha256=fTD3WQpsn3ImaxGW5S-JwVJyJJPoPp2mR6lAambdB8U,4755
22
22
  general_manager/interface/databaseBasedInterface.py,sha256=F-a6P9rvPUmlcoZw1rKSWEAzbYGccQRL6uokv6C46qo,21782
23
23
  general_manager/interface/databaseInterface.py,sha256=rhKVXhg0ztdIxKikTWtgjrkA7cwZTOYlEsRh0RWajDQ,6732
24
- general_manager/interface/models.py,sha256=gGYW5f1AUBpBakV3O0qsZwqMiWxZGdKRYXWaCBjt1oI,3334
24
+ general_manager/interface/models.py,sha256=P4bYb-Q7-moZR-hgIqwruMuftDgUW6FSqjPtWfHW04o,3311
25
25
  general_manager/interface/readOnlyInterface.py,sha256=TkfbOeaa2wCq5kCv0a3IwJWcYOTVbtNsdNWmGAz0Mns,11217
26
26
  general_manager/manager/__init__.py,sha256=l3RYp62aEhj3Y975_XUTIzo35LUnkTJHkb_hgChnXXI,111
27
27
  general_manager/manager/generalManager.py,sha256=4Qn9TYpZpqh5qC95BEAQhpiZgDrRXrAJjO2BbbXUdNg,9129
@@ -51,8 +51,8 @@ general_manager/utils/makeCacheKey.py,sha256=UlFsxHXgsYy69AAelkF6GDvY4h7AImT2bBn
51
51
  general_manager/utils/noneToZero.py,sha256=KfQtMQnrT6vsYST0K7lv6pVujkDcK3XL8czHYOhgqKQ,539
52
52
  general_manager/utils/pathMapping.py,sha256=nrz5owQg2a69Yig1eCXorR9U0NSw7NmBAk5OkeoHTdA,6842
53
53
  general_manager/utils/testing.py,sha256=ElZ8p4iZHxsHjDN8Lm5TmI6527CW747ltDOmtY6gAhk,11872
54
- generalmanager-0.11.1.dist-info/licenses/LICENSE,sha256=YGFm0ieb4KpkMRRt2qnWue6uFh0cUMtobwEBkHwajhc,1450
55
- generalmanager-0.11.1.dist-info/METADATA,sha256=Sam_MBu9NlrJgwolfC2jmDM5eq8kHOMXy-bhdyiEXkE,6206
56
- generalmanager-0.11.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
57
- generalmanager-0.11.1.dist-info/top_level.txt,sha256=sTDtExP9ga-YP3h3h42yivUY-A2Q23C2nw6LNKOho4I,16
58
- generalmanager-0.11.1.dist-info/RECORD,,
54
+ generalmanager-0.11.2.dist-info/licenses/LICENSE,sha256=YGFm0ieb4KpkMRRt2qnWue6uFh0cUMtobwEBkHwajhc,1450
55
+ generalmanager-0.11.2.dist-info/METADATA,sha256=zj1UfC74gZUgz9inrRIBqx2FAw0_UlXdxt_Iu-mvCyE,6206
56
+ generalmanager-0.11.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
57
+ generalmanager-0.11.2.dist-info/top_level.txt,sha256=sTDtExP9ga-YP3h3h42yivUY-A2Q23C2nw6LNKOho4I,16
58
+ generalmanager-0.11.2.dist-info/RECORD,,