Fix SMB share create: exclude server-generated path_local field

TrueNAS 25.x returns path_local in share query results but rejects it
on create with EINVAL. Added to _SMB_SHARE_READONLY so it is stripped
from the payload before submission.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-05 16:02:52 -05:00
parent c28ce9e3b8
commit 6042dabc8e

View File

@@ -14,7 +14,7 @@ from .summary import Summary
# ─────────────────────────────────────────────────────────────────────────────
# Read-only / server-generated fields that must NOT be sent on create/update
_SMB_SHARE_READONLY = frozenset({"id", "locked"})
_SMB_SHARE_READONLY = frozenset({"id", "locked", "path_local"})
# CORE SMB share fields that do not exist in the SCALE API
_SMB_SHARE_CORE_EXTRAS = frozenset({