fix: only fetch org if org exist
This commit is contained in:
parent
200c931f05
commit
45b006b580
@ -376,10 +376,13 @@ const deal = createResource({
|
||||
params: { name: props.dealId },
|
||||
cache: ['deal', props.dealId],
|
||||
onSuccess: async (data) => {
|
||||
organization.update({
|
||||
params: { doctype: 'CRM Organization', name: data.organization },
|
||||
})
|
||||
organization.fetch()
|
||||
if (data.organization) {
|
||||
organization.update({
|
||||
params: { doctype: 'CRM Organization', name: data.organization },
|
||||
})
|
||||
organization.fetch()
|
||||
}
|
||||
|
||||
let obj = {
|
||||
doc: data,
|
||||
$dialog,
|
||||
|
||||
@ -309,10 +309,13 @@ const deal = createResource({
|
||||
params: { name: props.dealId },
|
||||
cache: ['deal', props.dealId],
|
||||
onSuccess: async (data) => {
|
||||
organization.update({
|
||||
params: { doctype: 'CRM Organization', name: data.organization },
|
||||
})
|
||||
organization.fetch()
|
||||
if (data.organization) {
|
||||
organization.update({
|
||||
params: { doctype: 'CRM Organization', name: data.organization },
|
||||
})
|
||||
organization.fetch()
|
||||
}
|
||||
|
||||
let obj = {
|
||||
doc: data,
|
||||
$dialog,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user