Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

Use the spread syntax to do the patch

Tianzhou Chend630c39f8149
diff --git a/frontend/src/store/modules/environment.ts b/frontend/src/store/modules/environment.ts
index 8ce8d63477..886778bb37 100644
--- a/frontend/src/store/modules/environment.ts
+++ b/frontend/src/store/modules/environment.ts
@@ -94,13 +94,14 @@ const actions = {
},
async patchEnvironment({ commit }: any, environment: Environment) {
+ const { id, ...attrs } = environment;
const updatedEnvironment = convert(
(
await axios.patch(`/api/environment/${environment.id}`, {
data: {
type: "environment",
attributes: {
- name: environment.name,
+ ...attrs,
},
},
})