You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix the DataModelValidationError: ownership is not a mapping of user IDs and document permission levels that appeared when cascading folder ownership on Foundry v13/v14.
Parse the ownership form with FormDataExtended (the same path Foundry's own submit handler uses) so the nested ownership structure is exactly what Foundry expects, with a manual <select> fallback for older V1 forms.
Normalize ownership keys (dot + bracket notation), coerce all values to numbers, and drop non-concrete meta-levels (-1/-10/-20).
Always include a valid default level (falling back to the folder's stored default) when applying concrete user levels, so every contained document's merged ownership stays a valid mapping.
Clone the ownership object per document to avoid shared-reference mutation during Foundry's batch diffing.
If a batch update fails, retry per-document and log exactly which document/ownership failed, reporting a partial-success warning instead of a hard error.