diff --git a/packages/form-builder/addon/components/cfb-form-editor/copy-modal.js b/packages/form-builder/addon/components/cfb-form-editor/copy-modal.js index b32f1311a..cc17a7a28 100644 --- a/packages/form-builder/addon/components/cfb-form-editor/copy-modal.js +++ b/packages/form-builder/addon/components/cfb-form-editor/copy-modal.js @@ -35,7 +35,7 @@ export default class CfbFormEditorCopyModal extends Component { @dropTask *submit(changeset) { try { - const form = yield this.apollo.mutate( + yield this.apollo.mutate( { mutation: copyFormMutation, variables: { @@ -53,7 +53,7 @@ export default class CfbFormEditorCopyModal extends Component { this.intl.t("caluma.form-builder.notification.form.create.success"), ); - this.router.transitionTo("edit", form.slug); + this.router.transitionTo("edit", changeset.slug); } catch (e) { this.notification.danger( this.intl.t("caluma.form-builder.notification.form.create.error"), diff --git a/packages/form-builder/addon/gql/mutations/copy-form.graphql b/packages/form-builder/addon/gql/mutations/copy-form.graphql index ba28c4dec..e61794e41 100644 --- a/packages/form-builder/addon/gql/mutations/copy-form.graphql +++ b/packages/form-builder/addon/gql/mutations/copy-form.graphql @@ -1,10 +1,7 @@ -#import FormInfo from '../fragments/form-info.graphql' - mutation CopyForm($input: CopyFormInput!) { copyForm(input: $input) { form { id - ...FormInfo } clientMutationId }