ramifice 0.4.5__py3-none-any.whl → 0.4.6__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.6
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,7 @@ 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
+ if self.id.value is None and (self.password.value != self.сonfirm_password.value):
207
207
  error_map["password"] = gettext("Passwords do not match!")
208
208
  return error_map
209
209
 
@@ -245,6 +245,7 @@ async def main():
245
245
  print("User details:")
246
246
  user_details = await User.find_one_to_raw_doc(
247
247
  # {"_id": user.id.value}
248
+ # For `TextField`.
248
249
  {f"username.{translations.CURRENT_LOCALE}": user.username.value}
249
250
  )
250
251
  if user_details is not None:
@@ -255,6 +256,10 @@ async def main():
255
256
  # Remove User.
256
257
  await user.delete(remove_files=False)
257
258
 
259
+ # Remove collection.
260
+ # (if necessary)
261
+ await User.collection().drop()
262
+
258
263
  await client.close()
259
264
 
260
265
 
@@ -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.6.dist-info/METADATA,sha256=JzUrCs-zDKXvkX7QfbiIzrhoRB8mK-Nl3rcMAaS_rAY,21506
83
+ ramifice-0.4.6.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
84
+ ramifice-0.4.6.dist-info/licenses/LICENSE,sha256=LrEL0aTZx90HDwFUQCJutORiDjJL9AnuVvCtspXIqt4,1095
85
+ ramifice-0.4.6.dist-info/RECORD,,