Fixed scene tag delta storage format for actor associations.

This commit is contained in:
2026-03-22 05:39:22 +01:00
parent a4468f18dc
commit fa65da75bc

View File

@@ -967,6 +967,13 @@ export async function createSceneRevision(sceneId, { edits, comment, apply }, re
return [key, values.id];
}
if (key === 'tags') {
return [key, values.map((tag) => ({
id: tag.id,
actorId: tag.actorId,
}))];
}
if (Array.isArray(values)) {
return [key, values.map((value) => value?.hash || value?.id || value)];
}
@@ -983,6 +990,16 @@ export async function createSceneRevision(sceneId, { edits, comment, apply }, re
return null;
}
if (key === 'tags') {
return {
key,
value: value.map((tag) => ({
id: tag.id,
actorId: tag.actorId,
})),
};
}
if (Array.isArray(value)) {
const valueSet = new Set(value);
const baseSet = new Set(baseScene[key]);