Ormar

Latest version: v0.20.1

Safety actively analyzes 683322 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 10 of 14

0.6.1

Not secure
* Explicitly set None to excluded nullable fields to avoid pydantic setting a default value (fix [60][60]).

0.6.0

Not secure
* **Breaking:** calling instance.load() when the instance row was deleted from db now raises `NoMatch` instead of `ValueError`
* **Breaking:** calling add and remove on ReverseForeignKey relation now updates the child model in db setting/removing fk column
* **Breaking:** ReverseForeignKey relation now exposes QuerySetProxy API like ManyToMany relation
* **Breaking:** querying related models from ManyToMany cleans list of related models loaded on parent model:
* Example: `post.categories.first()` will set post.categories to list of 1 related model -> the one returned by first()
* Example 2: if post has 4 categories so `len(post.categories) == 4` calling `post.categories.limit(2).all()` -> will load only 2 children and now `assert len(post.categories) == 2`
* Added `get_or_create`, `update_or_create`, `fields`, `exclude_fields`, `exclude`, `prefetch_related` and `order_by` to QuerySetProxy
so now you can use those methods directly from relation
* Update docs

0.5.5

Not secure
* Fix for alembic autogenaration of migration `UUID` columns. It should just produce sqlalchemy `CHAR(32)` or `CHAR(36)`
* In order for this to work you have to set user_module_prefix='sa.' (must be equal to sqlalchemy_module_prefix option (default 'sa.'))

0.5.4

Not secure
* Allow to pass `uuid_format` (allowed 'hex'(default) or 'string') to `UUID` field to change the format in which it's saved.
By default field is saved in hex format (trimmed to 32 chars (without dashes)), but you can pass
format='string' to use 36 (with dashes) instead to adjust to existing db or other libraries.

Sample:
* hex value = c616ab438cce49dbbf4380d109251dce
* string value = c616ab43-8cce-49db-bf43-80d109251dce

0.5.3

Not secure
* Fixed bug in `Model.model_dump()` method that was ignoring exclude parameter and not include dictionary argument.

0.5.2

Not secure
* Added `prefetch_related` method to load subsequent models in separate queries.
* Update docs

Page 10 of 14

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.