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.
- ramifice/fields/choice_float_dyn_field.py +2 -2
- ramifice/fields/choice_float_field.py +1 -1
- ramifice/fields/choice_float_mult_dyn_field.py +2 -2
- ramifice/fields/choice_float_mult_field.py +1 -1
- ramifice/fields/choice_int_dyn_field.py +2 -2
- ramifice/fields/choice_int_field.py +1 -1
- ramifice/fields/choice_int_mult_dyn_field.py +2 -2
- ramifice/fields/choice_int_mult_field.py +1 -1
- ramifice/fields/choice_text_dyn_field.py +2 -2
- ramifice/fields/choice_text_field.py +1 -1
- ramifice/fields/choice_text_mult_dyn_field.py +2 -2
- ramifice/fields/choice_text_mult_field.py +1 -1
- ramifice/paladins/groups/choice_group.py +2 -1
- {ramifice-0.4.10.dist-info → ramifice-0.4.11.dist-info}/METADATA +3 -3
- {ramifice-0.4.10.dist-info → ramifice-0.4.11.dist-info}/RECORD +17 -17
- {ramifice-0.4.10.dist-info → ramifice-0.4.11.dist-info}/WHEEL +0 -0
- {ramifice-0.4.10.dist-info → ramifice-0.4.11.dist-info}/licenses/LICENSE +0 -0
@@ -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,
|
72
|
+
def has_value(self, is_migrate: bool = False) -> bool:
|
73
73
|
"""Does the field value match the possible options in choices."""
|
74
|
-
if
|
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,
|
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,
|
72
|
+
def has_value(self, is_migrate: bool = False) -> bool:
|
73
73
|
"""Does the field value match the possible options in choices."""
|
74
|
-
if
|
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,
|
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,
|
72
|
+
def has_value(self, is_migrate: bool = False) -> bool:
|
73
73
|
"""Does the field value match the possible options in choices."""
|
74
|
-
if
|
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,
|
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,
|
72
|
+
def has_value(self, is_migrate: bool = False) -> bool:
|
73
73
|
"""Does the field value match the possible options in choices."""
|
74
|
-
if
|
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,
|
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,
|
72
|
+
def has_value(self, is_migrate: bool = False) -> bool:
|
73
73
|
"""Does the field value match the possible options in choices."""
|
74
|
-
if
|
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,
|
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,
|
72
|
+
def has_value(self, is_migrate: bool = False) -> bool:
|
73
73
|
"""Does the field value match the possible options in choices."""
|
74
|
-
if
|
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,
|
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(
|
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.
|
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 ::
|
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-
|
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=
|
13
|
-
ramifice/fields/choice_float_field.py,sha256=
|
14
|
-
ramifice/fields/choice_float_mult_dyn_field.py,sha256=
|
15
|
-
ramifice/fields/choice_float_mult_field.py,sha256=
|
16
|
-
ramifice/fields/choice_int_dyn_field.py,sha256=
|
17
|
-
ramifice/fields/choice_int_field.py,sha256=
|
18
|
-
ramifice/fields/choice_int_mult_dyn_field.py,sha256=
|
19
|
-
ramifice/fields/choice_int_mult_field.py,sha256=
|
20
|
-
ramifice/fields/choice_text_dyn_field.py,sha256=
|
21
|
-
ramifice/fields/choice_text_field.py,sha256=
|
22
|
-
ramifice/fields/choice_text_mult_dyn_field.py,sha256=
|
23
|
-
ramifice/fields/choice_text_mult_field.py,sha256=
|
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=
|
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.
|
83
|
-
ramifice-0.4.
|
84
|
-
ramifice-0.4.
|
85
|
-
ramifice-0.4.
|
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,,
|
File without changes
|
File without changes
|