Cleanerversion

Latest version: v2.1.1

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

Scan your dependencies

Page 3 of 5

1.4.9

This is a bugfix release to ensure that only current objects can be deleted.

1.4.8

Versionable objects now only get "soft-deleted" contrary to native Django model instances that continue to be deleted from DB as usual.

1.4.7

Do not collect non-current versions for deletion

1.4.6

When passing ForeignKeys to restore(), follow Django practice for allowing either objects or ids to be passed.

With an object:


employee.restore(team=new_team)


With an id:


employee.restore(team_id=new_team.id)

1.4.5

Deletion handling has changed. Previously, VersionedForeignKey on_delete handlers were ignored. Cascade (the default), protect, and other on_delete handlers now take effect for VersionedForeignKeys. See the CleanerVersion docs for the behaviour details.

Versionable.restore() is added to allow restoring previous versions (without relations).

Versionable.detach() is added to allow giving an existing object.

It is possible to specify an id yourself when creating a new Versionable (but beware: all sources that are generating uuids should have sufficient entropy if UUID collisions are to be avoided).

VersionManager.previous_version() and VersionManager.next_version() now default to returning object's whose as_of time is set to one microsecond before the version's end date. This affects when the relations are returned if relations are traversed via the returned object. See CleanerVersion docs for available alternative behaviours.

1.4.4

It is now possible to auto-reference models through M2M relationships.
No schema adaptions needed.

Page 3 of 5

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.