From 6c9789fdf3e4514cf8bcdd334e295768b200fa51 Mon Sep 17 00:00:00 2001 From: forbes-0023 Date: Tue, 10 Feb 2026 10:39:13 -0600 Subject: [PATCH] fix: use FreeCADGui.Document.Modified instead of App.Document.IsModified() App.Document has no IsModified() method, causing Silo_Pull to crash with AttributeError. The correct API is to get the Gui document and check its Modified property, consistent with the pattern used elsewhere in this file (lines 891, 913). --- freecad/silo_commands.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/freecad/silo_commands.py b/freecad/silo_commands.py index 1bd06dc..a2398aa 100644 --- a/freecad/silo_commands.py +++ b/freecad/silo_commands.py @@ -990,8 +990,10 @@ def _check_pull_conflicts(part_number, local_path, doc=None): conflicts = [] # Check for unsaved changes in an open document - if doc is not None and doc.IsModified(): - conflicts.append("Document has unsaved local changes.") + if doc is not None: + gui_doc = FreeCADGui.getDocument(doc.Name) if doc.Name else None + if gui_doc and gui_doc.Modified: + conflicts.append("Document has unsaved local changes.") # Check local revision vs server latest if doc is not None: -- 2.49.1