linkahead.utils.create_revision module
provides utilities for creating revisions of database entries.
- linkahead.utils.create_revision.bend_references(from_id, to_id, except_for=None)
redirects all references to a new target.
All entities having a reference pointing to from_id are found and those references are changed to point to to_id. entities having an id listed in except_for are excluded.
- linkahead.utils.create_revision.create_revision(old_id, prop, value)
creates a revision of an existing record.
This function changes the record with id old_id. The value of the propertye prop is changed to value.