mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-22 08:20:39 +00:00
UBER-289: Prevent empty changes to go into transactions. (#3277)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
parent
eae0107d28
commit
6b7e83ce8c
@ -106,7 +106,7 @@
|
|||||||
const updates: Partial<Data<Vacancy>> = {}
|
const updates: Partial<Data<Vacancy>> = {}
|
||||||
const trimmedName = rawName.trim()
|
const trimmedName = rawName.trim()
|
||||||
|
|
||||||
if (trimmedName.length > 0 && trimmedName !== object.name) {
|
if (trimmedName.length > 0 && trimmedName !== object.name?.trim()) {
|
||||||
updates.name = trimmedName
|
updates.name = trimmedName
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -108,7 +108,7 @@
|
|||||||
|
|
||||||
const trimmedTitle = title.trim()
|
const trimmedTitle = title.trim()
|
||||||
|
|
||||||
if (trimmedTitle.length > 0 && trimmedTitle !== issue.title) {
|
if (trimmedTitle.length > 0 && trimmedTitle !== issue.title?.trim()) {
|
||||||
await client.update(issue, { title: trimmedTitle })
|
await client.update(issue, { title: trimmedTitle })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -97,7 +97,7 @@
|
|||||||
|
|
||||||
const trimmedTitle = title.trim()
|
const trimmedTitle = title.trim()
|
||||||
|
|
||||||
if (trimmedTitle.length > 0 && trimmedTitle !== template.title) {
|
if (trimmedTitle.length > 0 && trimmedTitle !== template.title?.trim()) {
|
||||||
await client.update(template, { title: trimmedTitle })
|
await client.update(template, { title: trimmedTitle })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user