diff --git a/map/client/components/catalog/KCreateView.vue b/map/client/components/catalog/KCreateView.vue index f0d676cda..86d328ac9 100644 --- a/map/client/components/catalog/KCreateView.vue +++ b/map/client/components/catalog/KCreateView.vue @@ -102,8 +102,8 @@ export default { try { this.creating = true const createdView = await this.kActivity.saveContext(view) - // Add view to current project ? - if (this.project) { + // Add view to current project ? Check if not coming from another planet first + if (this.project && (project.getPlanetApi() === this.$api)) { this.project.views.push({ _id: createdView._id }) await this.$api.getService('projects').patch(this.project._id, { views: this.project.views diff --git a/map/client/mixins/mixin.activity.js b/map/client/mixins/mixin.activity.js index 174d38a78..0c811ca5b 100644 --- a/map/client/mixins/mixin.activity.js +++ b/map/client/mixins/mixin.activity.js @@ -184,8 +184,8 @@ export const activity = { // Otherwise simply save in catalog createdLayer = await layers.saveLayer(layer) } - // Add layer to current project ? - if (this.project) { + // Add layer to current project ? Check if not coming from another planet first + if (this.project && (project.getPlanetApi() === this.$api)) { this.project.layers.push({ _id: createdLayer._id }) await this.$api.getService('projects').patch(this.project._id, { layers: this.project.layers