fix(form-add): resolve directory path to sibling .xml file

When ObjectPath is a directory (e.g. Catalogs/Номенклатура),
auto-resolve to the sibling XML file (Catalogs/Номенклатура.xml)
before parsing. Matches behavior of other edit scripts.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Nick Shirokov
2026-02-25 17:02:56 +03:00
parent d9ce7b03cc
commit c5abfc3a4f
+3 -1
View File
@@ -48,7 +48,9 @@ def main():
# --- Phase 1: Determine object type ---
if not os.path.exists(object_path):
if os.path.isdir(object_path):
object_path = object_path.rstrip("/\\") + ".xml"
if not os.path.isfile(object_path):
print(f"Файл объекта не найден: {object_path}", file=sys.stderr)
sys.exit(1)