Fix view group operation by not sending __typename (#15092)
Following https://github.com/twentyhq/twenty/pull/15052
This commit is contained in:
+1
-1
@@ -59,7 +59,7 @@ export const useSetViewTypeFromLayoutOptionsMenu = () => {
|
||||
} satisfies ViewGroup);
|
||||
|
||||
await createViewGroupRecords(
|
||||
viewGroupsToCreate.map((viewGroup) => ({
|
||||
viewGroupsToCreate.map(({ __typename, ...viewGroup }) => ({
|
||||
input: {
|
||||
...viewGroup,
|
||||
viewId: currentViewId,
|
||||
|
||||
+1
-1
@@ -107,7 +107,7 @@ export const useHandleRecordGroupField = () => {
|
||||
|
||||
if (viewGroupsToCreate.length > 0) {
|
||||
await createViewGroupRecords(
|
||||
viewGroupsToCreate.map((viewGroup) => ({
|
||||
viewGroupsToCreate.map(({ __typename, ...viewGroup }) => ({
|
||||
input: {
|
||||
...viewGroup,
|
||||
viewId: view.id,
|
||||
|
||||
@@ -195,7 +195,7 @@ export const useCreateViewFromCurrentView = (viewBarComponentId?: string) => {
|
||||
} satisfies ViewGroup);
|
||||
|
||||
await createViewGroupRecords(
|
||||
viewGroupsToCreate.map((viewGroup) => ({
|
||||
viewGroupsToCreate.map(({ __typename, ...viewGroup }) => ({
|
||||
input: {
|
||||
...viewGroup,
|
||||
viewId: newViewId,
|
||||
|
||||
@@ -152,7 +152,7 @@ export const useSaveCurrentViewGroups = () => {
|
||||
|
||||
await Promise.all([
|
||||
createViewGroupRecords(
|
||||
viewGroupsToCreate.map((viewGroup) => ({
|
||||
viewGroupsToCreate.map(({ __typename, ...viewGroup }) => ({
|
||||
input: {
|
||||
...viewGroup,
|
||||
viewId: view.id,
|
||||
|
||||
Reference in New Issue
Block a user