Skip to content

Commit ece3121

Browse files
committed
projectDocument doesn't contain the following properties
1 parent eacee48 commit ece3121

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

services/static-webserver/client/source/class/osparc/data/model/Study.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,6 @@ qx.Class.define("osparc.data.model.Study", {
294294
// Properties of the Study class that should not be serialized
295295
// when serializing the study object to send it to the backend
296296
IgnoreSerializationProps: [
297-
"lastChangeDate",
298297
"permalink",
299298
"state",
300299
"pipelineRunning",

services/static-webserver/client/source/class/osparc/desktop/StudyEditor.js

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,23 @@ qx.Class.define("osparc.desktop.StudyEditor", {
290290

291291
if (!socket.slotExists("projectDocument:updated")) {
292292
socket.on("projectDocument:updated", data => {
293-
console.log("projectDocument:updated", data);
293+
if (data["projectId"] === this.getStudy().getUuid()) {
294+
console.log("projectDocument:updated", data);
295+
const currentStudy = this.getStudy().serialize();
296+
// the projectDocument doesn't contain the following properties
297+
[
298+
"accessRights",
299+
"creationDate",
300+
"folderId",
301+
"prjOwner",
302+
"tags",
303+
"trashedBy",
304+
].forEach(prop => {
305+
delete currentStudy[prop];
306+
});
307+
const delta = osparc.wrapper.JsonDiffPatch.getInstance().diff(currentStudy, data["document"]);
308+
console.log("projectDocument:updated delta", delta);
309+
}
294310
}, this);
295311
}
296312
},

0 commit comments

Comments
 (0)