drawings: on a rev mismatch, Clerical can keep the retired rev VISUAL calls (#41)
When VISUAL calls a rev that M-Files has retired, the draft is still flagged rev_mismatch, but the drawing job now also copies the rev VISUAL calls (MFilesKit 0.1.3 DrawingLookup.revision) into drawing_revisions and visual.called. A Clerical Supervisor picks either rev on the packet: "Use latest rev N" as before, or "Use rev V as VISUAL calls it" (rev-approve with use=called), with a reason and a signature. The kept rev holds while M-Files' Effective rev stays the one chosen against: no flag, no change order. A newer Effective rev flags the packet again; a new VISUAL rev clears the choice. Migration 0009 adds drawing_revisions. Needs mfileskit 0.1.3. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -501,7 +501,7 @@ def _update_draft(run: _Run, packet: Mapping[str, Any], c: Candidate) -> None:
|
||||
state = str(row.get("drawing_state"))
|
||||
if moved:
|
||||
conn.execute("DELETE FROM packet_pages WHERE packet_id = %s AND type = 'drawing'", (sw.id,))
|
||||
for k in ("rev_ok", "manual_dwg", "vault", "appr"):
|
||||
for k in ("rev_ok", "manual_dwg", "vault", "appr", "called"):
|
||||
visual.pop(k, None)
|
||||
visual["rev_confirmed"] = False
|
||||
flags = [f for f in flags if f not in DRAWING_FLAGS]
|
||||
|
||||
Reference in New Issue
Block a user