AppInfo: send config panel args only if not empty

This commit is contained in:
axolotle 2023-03-24 13:49:50 +01:00
parent bf15696363
commit 057a33e8bf

View file

@ -265,6 +265,7 @@ import api, { objectToParams } from '@/api'
import { readableDate } from '@/helpers/filters/date'
import { humanPermissionName } from '@/helpers/filters/human'
import { required } from '@/helpers/validators'
import { isEmptyValue } from '@/helpers/commons'
import {
formatFormData,
formatI18nField,
@ -438,7 +439,7 @@ export default {
action
? `apps/${this.id}/actions/${action}`
: `apps/${this.id}/config/${id}`,
{ args: objectToParams(args) },
isEmptyValue(args) ? {} : { args: objectToParams(args) },
{ key: `apps.${action ? 'action' : 'update'}_config`, id, name: this.id }
).then(() => {
this.$refs.view.fetchQueries({ triggerLoading: true })