ramifice 0.4.5__py3-none-any.whl → 0.4.7__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ramifice
3
- Version: 0.4.5
3
+ Version: 0.4.7
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/
@@ -203,7 +203,13 @@ class User:
203
203
  """Additional validation of fields."""
204
204
  gettext = translations.gettext
205
205
  error_map: dict[str, str] = {}
206
- if self.password.value != self.сonfirm_password.value:
206
+
207
+ # Get clean data.
208
+ id = self.id.value
209
+ password = self.password.value
210
+ сonfirm_password = self.сonfirm_password.value
211
+
212
+ if id is None and (password != сonfirm_password):
207
213
  error_map["password"] = gettext("Passwords do not match!")
208
214
  return error_map
209
215
 
@@ -245,6 +251,7 @@ async def main():
245
251
  print("User details:")
246
252
  user_details = await User.find_one_to_raw_doc(
247
253
  # {"_id": user.id.value}
254
+ # For `TextField`.
248
255
  {f"username.{translations.CURRENT_LOCALE}": user.username.value}
249
256
  )
250
257
  if user_details is not None:
@@ -255,6 +262,10 @@ async def main():
255
262
  # Remove User.
256
263
  await user.delete(remove_files=False)
257
264
 
265
+ # Remove collection.
266
+ # (if necessary)
267
+ await User.collection().drop()
268
+
258
269
  await client.close()
259
270
 
260
271
 
@@ -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.5.dist-info/METADATA,sha256=2gwEZsJJmFhhFAayDTWsB1kIKwWNmeadZVMt-4Fgwyc,21369
83
- ramifice-0.4.5.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
84
- ramifice-0.4.5.dist-info/licenses/LICENSE,sha256=LrEL0aTZx90HDwFUQCJutORiDjJL9AnuVvCtspXIqt4,1095
85
- ramifice-0.4.5.dist-info/RECORD,,
82
+ ramifice-0.4.7.dist-info/METADATA,sha256=Y9az_v09wOlmV1h_8g-MFjVibWjir3950fJnddGoRe0,21624
83
+ ramifice-0.4.7.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
84
+ ramifice-0.4.7.dist-info/licenses/LICENSE,sha256=LrEL0aTZx90HDwFUQCJutORiDjJL9AnuVvCtspXIqt4,1095
85
+ ramifice-0.4.7.dist-info/RECORD,,