mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-28 04:25:03 +02:00
UBER-289: Prevent empty changes to go into transactions. (#3277)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
@@ -106,7 +106,7 @@
|
||||
const updates: Partial<Data<Vacancy>> = {}
|
||||
const trimmedName = rawName.trim()
|
||||
|
||||
if (trimmedName.length > 0 && trimmedName !== object.name) {
|
||||
if (trimmedName.length > 0 && trimmedName !== object.name?.trim()) {
|
||||
updates.name = trimmedName
|
||||
}
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
|
||||
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 })
|
||||
}
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
|
||||
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 })
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user