Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
Mirage, update stageProgressList only if it exists
Tianzhou Chen299adfc36ad4
diff --git a/frontend/src/miragejs/routes/index.js b/frontend/src/miragejs/routes/index.jsindex 50818d4e7c..fd7956c204 100644--- a/frontend/src/miragejs/routes/index.js+++ b/frontend/src/miragejs/routes/index.js@@ -94,15 +94,17 @@ export default function routes() {const attrs = this.normalizedRequestAttrs("task-patch");const task = schema.tasks.find(request.params.taskId);if (task) {- attrs.stageProgressList = task.stageProgressList.map((item) => {- for (const stage of attrs.stageProgressList) {- if (item.id === stage.id) {- item.status = stage.status;- break;+ if (attrs.stageProgressList) {+ attrs.stageProgressList = task.stageProgressList.map((item) => {+ for (const stage of attrs.stageProgressList) {+ if (item.id === stage.id) {+ item.status = stage.status;+ break;+ }}- }- return item;- });+ return item;+ });+ }return task.update({ ...attrs, lastUpdatedTs: Date.now() });}return new Response(