ramifice 0.4.10__py3-none-any.whl → 0.4.11__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.
@@ -69,9 +69,9 @@ class ChoiceFloatDynField(Field, ChoiceGroup, JsonMixin):
69
69
  self.value: float | None = None
70
70
  self.choices: dict[str, float] | None = None
71
71
 
72
- def has_value(self, is_migrat: bool = False) -> bool:
72
+ def has_value(self, is_migrate: bool = False) -> bool:
73
73
  """Does the field value match the possible options in choices."""
74
- if is_migrat:
74
+ if is_migrate:
75
75
  return True
76
76
  value = self.value
77
77
  if value is not None:
@@ -80,7 +80,7 @@ class ChoiceFloatField(Field, ChoiceGroup, JsonMixin):
80
80
  if not isinstance(readonly, bool):
81
81
  raise AssertionError("Parameter `readonly` - Not а `bool` type!")
82
82
 
83
- def has_value(self, is_migrat: bool = False) -> bool:
83
+ def has_value(self, is_migrate: bool = False) -> bool:
84
84
  """Does the field value match the possible options in choices."""
85
85
  value = self.value
86
86
  if value is None:
@@ -69,9 +69,9 @@ class ChoiceFloatMultDynField(Field, ChoiceGroup, JsonMixin):
69
69
  self.value: list[float] | None = None
70
70
  self.choices: dict[str, float] | None = None
71
71
 
72
- def has_value(self, is_migrat: bool = False) -> bool:
72
+ def has_value(self, is_migrate: bool = False) -> bool:
73
73
  """Does the field value match the possible options in choices."""
74
- if is_migrat:
74
+ if is_migrate:
75
75
  return True
76
76
  value = self.value
77
77
  if value is not None:
@@ -91,7 +91,7 @@ class ChoiceFloatMultField(Field, ChoiceGroup, JsonMixin):
91
91
  if not isinstance(readonly, bool):
92
92
  raise AssertionError("Parameter `readonly` - Not а `bool` type!")
93
93
 
94
- def has_value(self, is_migrat: bool = False) -> bool:
94
+ def has_value(self, is_migrate: bool = False) -> bool:
95
95
  """Does the field value match the possible options in choices."""
96
96
  value = self.value
97
97
  if value is None:
@@ -69,9 +69,9 @@ class ChoiceIntDynField(Field, ChoiceGroup, JsonMixin):
69
69
  self.value: int | None = None
70
70
  self.choices: dict[str, int] | None = None
71
71
 
72
- def has_value(self, is_migrat: bool = False) -> bool:
72
+ def has_value(self, is_migrate: bool = False) -> bool:
73
73
  """Does the field value match the possible options in choices."""
74
- if is_migrat:
74
+ if is_migrate:
75
75
  return True
76
76
  value = self.value
77
77
  if value is not None:
@@ -80,7 +80,7 @@ class ChoiceIntField(Field, ChoiceGroup, JsonMixin):
80
80
  if not isinstance(readonly, bool):
81
81
  raise AssertionError("Parameter `readonly` - Not а `bool` type!")
82
82
 
83
- def has_value(self, is_migrat: bool = False) -> bool:
83
+ def has_value(self, is_migrate: bool = False) -> bool:
84
84
  """Does the field value match the possible options in choices."""
85
85
  value = self.value
86
86
  if value is None:
@@ -69,9 +69,9 @@ class ChoiceIntMultDynField(Field, ChoiceGroup, JsonMixin):
69
69
  self.value: list[int] | None = None
70
70
  self.choices: dict[str, int] | None = None
71
71
 
72
- def has_value(self, is_migrat: bool = False) -> bool:
72
+ def has_value(self, is_migrate: bool = False) -> bool:
73
73
  """Does the field value match the possible options in choices."""
74
- if is_migrat:
74
+ if is_migrate:
75
75
  return True
76
76
  value = self.value
77
77
  if value is not None:
@@ -91,7 +91,7 @@ class ChoiceIntMultField(Field, ChoiceGroup, JsonMixin):
91
91
  if not isinstance(readonly, bool):
92
92
  raise AssertionError("Parameter `readonly` - Not а `bool` type!")
93
93
 
94
- def has_value(self, is_migrat: bool = False) -> bool:
94
+ def has_value(self, is_migrate: bool = False) -> bool:
95
95
  """Does the field value match the possible options in choices."""
96
96
  value = self.value
97
97
  if value is None:
@@ -69,9 +69,9 @@ class ChoiceTextDynField(Field, ChoiceGroup, JsonMixin):
69
69
  self.value: str | None = None
70
70
  self.choices: dict[str, str] | None = None
71
71
 
72
- def has_value(self, is_migrat: bool = False) -> bool:
72
+ def has_value(self, is_migrate: bool = False) -> bool:
73
73
  """Does the field value match the possible options in choices."""
74
- if is_migrat:
74
+ if is_migrate:
75
75
  return True
76
76
  value = self.value
77
77
  if value is not None:
@@ -85,7 +85,7 @@ class ChoiceTextField(Field, ChoiceGroup, JsonMixin):
85
85
  if not isinstance(readonly, bool):
86
86
  raise AssertionError("Parameter `readonly` - Not а `bool` type!")
87
87
 
88
- def has_value(self, is_migrat: bool = False) -> bool:
88
+ def has_value(self, is_migrate: bool = False) -> bool:
89
89
  """Does the field value match the possible options in choices."""
90
90
  value = self.value
91
91
  if value is None:
@@ -69,9 +69,9 @@ class ChoiceTextMultDynField(Field, ChoiceGroup, JsonMixin):
69
69
  self.value: list[str] | None = None
70
70
  self.choices: dict[str, str] | None = None
71
71
 
72
- def has_value(self, is_migrat: bool = False) -> bool:
72
+ def has_value(self, is_migrate: bool = False) -> bool:
73
73
  """Does the field value match the possible options in choices."""
74
- if is_migrat:
74
+ if is_migrate:
75
75
  return True
76
76
  value = self.value
77
77
  if value is not None:
@@ -91,7 +91,7 @@ class ChoiceTextMultField(Field, ChoiceGroup, JsonMixin):
91
91
  if not isinstance(readonly, bool):
92
92
  raise AssertionError("Parameter `readonly` - Not а `bool` type!")
93
93
 
94
- def has_value(self, is_migrat: bool = False) -> bool:
94
+ def has_value(self, is_migrate: bool = False) -> bool:
95
95
  """Does the field value match the possible options in choices."""
96
96
  value = self.value
97
97
  if value is None:
@@ -26,6 +26,7 @@ class ChoiceGroupMixin:
26
26
  def choice_group(self, params: dict[str, Any]) -> None:
27
27
  """Checking choice fields."""
28
28
  field = params["field_data"]
29
+ is_migrate = params["is_migration_process"]
29
30
  # Get current value.
30
31
  value = field.value or field.__dict__.get("default") or None
31
32
 
@@ -37,7 +38,7 @@ class ChoiceGroupMixin:
37
38
  params["result_map"][field.name] = None
38
39
  return
39
40
  # Does the field value match the possible options in choices.
40
- if not field.has_value(is_migrat=params["is_migration_process"]):
41
+ if not field.has_value(is_migrate):
41
42
  err_msg = translations._("Your choice does not match the options offered !")
42
43
  accumulate_error(err_msg, params)
43
44
  # Insert result.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ramifice
3
- Version: 0.4.10
3
+ Version: 0.4.11
4
4
  Summary: ORM-like API MongoDB for Python language.
5
5
  Project-URL: Homepage, https://github.com/kebasyaty/ramifice
6
6
  Project-URL: Documentation, https://kebasyaty.github.io/ramifice/
@@ -12,7 +12,7 @@ Author-email: Gennady Kostyunin <kebasyaty@gmail.com>
12
12
  License-Expression: MIT
13
13
  License-File: LICENSE
14
14
  Keywords: mongo,mongodb,orm,pymongo,ramifice
15
- Classifier: Development Status :: 3 - Alpha
15
+ Classifier: Development Status :: 4 - Beta
16
16
  Classifier: Intended Audience :: Developers
17
17
  Classifier: License :: OSI Approved :: MIT License
18
18
  Classifier: Programming Language :: Python :: 3
@@ -82,7 +82,7 @@ _For more information see [PyMongo](https://pypi.org/project/pymongo/ "PyMongo")
82
82
 
83
83
  <p>
84
84
  <a href="https://github.com/kebasyaty/ramifice" alt="Project Status">
85
- <img src="https://raw.githubusercontent.com/kebasyaty/ramifice/v0/assets/project_status/project-status-alpha.svg"
85
+ <img src="https://raw.githubusercontent.com/kebasyaty/ramifice/v0/assets/project_status/project-status-beta.svg"
86
86
  alt="Project Status">
87
87
  </a>
88
88
  </p>
@@ -9,18 +9,18 @@ ramifice/commons/tools.py,sha256=s4CdHb9h8aqR371py0KVsBnNBJSW8-7AVjbTmuFAeeg,179
9
9
  ramifice/commons/unit_manager.py,sha256=IkWqXu1PHHal0aGfx6zme81iXPeygxPqEWO-u_8RXoI,4356
10
10
  ramifice/fields/__init__.py,sha256=yRfX7Tvpuh27Ggcx5u9e1RRYK7Wu59EVJYxxetmuP1w,1290
11
11
  ramifice/fields/bool_field.py,sha256=WWubSwsFJZu8b3MviDd2zXnNYOQaYw8toklFNSTVFLA,2072
12
- ramifice/fields/choice_float_dyn_field.py,sha256=FNOX8999vOz9S_0UK1Mn_K9s3Mmy7OeXioCM1bOwtD0,3091
13
- ramifice/fields/choice_float_field.py,sha256=rf93rsDkl4AImIIimkpFdMf3DzDq4j3yCzv_alu-R5U,3674
14
- ramifice/fields/choice_float_mult_dyn_field.py,sha256=RRSWEietLjR3e0R62oq7c8PIng0XmHoLLJj0k9veE60,3154
15
- ramifice/fields/choice_float_mult_field.py,sha256=a3n1YnBN7VBu45nLIl3eu3FcuEj86LebvT_iPzgLFnc,4231
16
- ramifice/fields/choice_int_dyn_field.py,sha256=QhP0mGHTj3V4KKPj6hsc05bOe4Hw2TnNHimQBixVYAs,3085
17
- ramifice/fields/choice_int_field.py,sha256=PyyFCkz-2lwKLJaKdR0DwYctMSk7n0iqxFbYeXUhVJQ,3662
18
- ramifice/fields/choice_int_mult_dyn_field.py,sha256=NMPDWcgR6doeCHPYIHFeD9w66FcE6uKIVEIW4Zmk3YA,3150
19
- ramifice/fields/choice_int_mult_field.py,sha256=gzmtf9segqAH7IuaZjR6l9cyaCNIrBdWKRuNPAU0Klk,4225
20
- ramifice/fields/choice_text_dyn_field.py,sha256=yfk9pa1_KEKFNL5PzvTkRuz_83q3Lf38sBdogBQpybI,3081
21
- ramifice/fields/choice_text_field.py,sha256=W4X5HkMVBrxu_6hWRfOffU6GAhgJEh9fJAb6cLIESPk,3867
22
- ramifice/fields/choice_text_mult_dyn_field.py,sha256=xU_8mGPHIsRFndziE5o2NhuxwSg_cJX1mSBYMQtB8Yw,3146
23
- ramifice/fields/choice_text_mult_field.py,sha256=0pNE2WWoyk_rX7-IMq3KUx6Yxl8OzSf0-_WGTRnxX1g,4221
12
+ ramifice/fields/choice_float_dyn_field.py,sha256=Yrd9cNKLm0mhU-P3IojwFRLSbuxdp7f2NMGJhrRWsf8,3093
13
+ ramifice/fields/choice_float_field.py,sha256=GX7ygsflgXFwwU5Gacq8EsXTdzdgNxWfT5ys8z4s2K8,3675
14
+ ramifice/fields/choice_float_mult_dyn_field.py,sha256=zDaJ_-qSytIXfY4EH43QwPB0dtkQfHPCGSZI7VMDnoo,3156
15
+ ramifice/fields/choice_float_mult_field.py,sha256=TArh0D13F9JuJjFn7WDrBzAqDCL03T35z1nZB4T55Rw,4232
16
+ ramifice/fields/choice_int_dyn_field.py,sha256=pryP7KDvRexKBo9mQTwN61Rnyuhiiv_ZHw56wWFe_bs,3087
17
+ ramifice/fields/choice_int_field.py,sha256=OyuADapAIwlutYvAtu-g7hwmq251e9cHMqKP4dm9Du8,3663
18
+ ramifice/fields/choice_int_mult_dyn_field.py,sha256=BZbH0SUcJji6daazj3ovBYCaY1o00rMBbEFzCzDu7b4,3152
19
+ ramifice/fields/choice_int_mult_field.py,sha256=4PZx0Wv1R2Wq5JZWQNqqYi_4OX13KNwdxlwlyKqndZM,4226
20
+ ramifice/fields/choice_text_dyn_field.py,sha256=HcJXq9HHgglz_BTOpGfvXmxH2BGhXze_-QAampmTGnI,3083
21
+ ramifice/fields/choice_text_field.py,sha256=JHauvxmYIbxUMjCgOHI0IcBNT2zv2gPH0njp6qXlKr4,3868
22
+ ramifice/fields/choice_text_mult_dyn_field.py,sha256=GmoRveIQjidAV-NOmfEO2irlG6agRHpMKNUFVzKSGiM,3148
23
+ ramifice/fields/choice_text_mult_field.py,sha256=RHB38fNL4ppasE-x2jJE73s221sDZ-YX3-WgpYsI_kA,4222
24
24
  ramifice/fields/color_field.py,sha256=NdYey3Og8hh7oK7yDljrG6K8frgqj4C2OTXFnJVAYFQ,3526
25
25
  ramifice/fields/date_field.py,sha256=w875p6JwssKhEZJLBHmC8sE5wArn161rlQi0Zt-qEZo,5214
26
26
  ramifice/fields/date_time_field.py,sha256=OGi-ED-Gm_AWGzczHA1qch59IuWy3KkVIJHQl3OlatU,5249
@@ -57,7 +57,7 @@ ramifice/paladins/tools.py,sha256=QxxwZILyBLcAiDUN48KE99c_cHVjG-VYilEsIinRhEU,26
57
57
  ramifice/paladins/validation.py,sha256=gcEJXIEPu1g7Z54vl14YTs5rCmxOEYsgQH1usFfyy7k,1730
58
58
  ramifice/paladins/groups/__init__.py,sha256=hpqmWLsYAMvZHAbmMXluQSqLhkHOSTUAgLHyTM1LTYI,472
59
59
  ramifice/paladins/groups/bool_group.py,sha256=oJc9mw9KGrnK_Pj7uXixYYQAJphcXLr_xSQv3PMUlcU,792
60
- ramifice/paladins/groups/choice_group.py,sha256=96MOiOn-dD_GgYOCBjkG_Gct-mEF35z1TSCzEkyXK5o,1768
60
+ ramifice/paladins/groups/choice_group.py,sha256=NsOdPMHtnK-ITnSQxEteCeTFhk7MrJJ3wIcDEeOgodU,1791
61
61
  ramifice/paladins/groups/date_group.py,sha256=B9usKKrHX16F1ckik60Xkub1tawgNENSHTk5Rt-K96k,3741
62
62
  ramifice/paladins/groups/file_group.py,sha256=-xgtrLOTlKXc71Mnbu3I_LbYnTEd8OprnhtYcJbaDtg,2932
63
63
  ramifice/paladins/groups/id_group.py,sha256=q5BeoM1e7mZmX0zVgemva9K-9ihJKBrX8kxvMh-uhhQ,1268
@@ -79,7 +79,7 @@ ramifice/utils/mixins/add_valid.py,sha256=TLOObedzXNA9eCylfAVbVCqIKE5sV-P5AdIN7a
79
79
  ramifice/utils/mixins/hooks.py,sha256=33jvJRhfnJeL2Hd_YFXk3M_7wjqHaByU2wRjKyboL6s,914
80
80
  ramifice/utils/mixins/indexing.py,sha256=Z0427HoaVRyNmSNN8Fx0mSICgAKV-gDdu3iR5qYUEbs,329
81
81
  ramifice/utils/mixins/json_converter.py,sha256=WhigXyDAV-FfILaZuwvRFRIk0D90Rv3dG5t-mv5fVyc,1107
82
- ramifice-0.4.10.dist-info/METADATA,sha256=KO9Jhk80L6Y9NajuZQ37nBSWxJt1XRHcyTGO2VFbuWY,21787
83
- ramifice-0.4.10.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
84
- ramifice-0.4.10.dist-info/licenses/LICENSE,sha256=LrEL0aTZx90HDwFUQCJutORiDjJL9AnuVvCtspXIqt4,1095
85
- ramifice-0.4.10.dist-info/RECORD,,
82
+ ramifice-0.4.11.dist-info/METADATA,sha256=wgz9BoK-X9H0JftAf608T2qd8nBKBnoC1Q4mlb8rygs,21785
83
+ ramifice-0.4.11.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
84
+ ramifice-0.4.11.dist-info/licenses/LICENSE,sha256=LrEL0aTZx90HDwFUQCJutORiDjJL9AnuVvCtspXIqt4,1095
85
+ ramifice-0.4.11.dist-info/RECORD,,