def _set_doc_latest(doc): """ Set the 'latest version'-related fields on a document for rendering. This is computed at load-time before each rendering of document. It is not pre-computed or stored in the DB. returns: None """ docutils_obj = DocumentUtils() latest = docutils_obj.get_latest_doc(doc.id) doc.latest(latest.id, latest.created_at, latest.creator.email)
def _set_doc_latest(doc): docutils_obj = DocumentUtils() latest = docutils_obj.get_latest_doc(doc.id) doc.latest(latest.id, latest.created_at, latest.creator.email)