fix: reset custom info override when customer reanswers question
This commit is contained in:
parent
99f8a516c3
commit
9d49c172f4
1 changed files with 4 additions and 1 deletions
|
|
@ -113,7 +113,10 @@ const setCustomerData = (customerId, infoRequestId, data) => {
|
||||||
INSERT INTO customers_custom_info_requests (customer_id, info_request_id, customer_data)
|
INSERT INTO customers_custom_info_requests (customer_id, info_request_id, customer_data)
|
||||||
VALUES ($1, $2, $3)
|
VALUES ($1, $2, $3)
|
||||||
ON CONFLICT (customer_id, info_request_id)
|
ON CONFLICT (customer_id, info_request_id)
|
||||||
DO UPDATE SET customer_data = $3`
|
DO UPDATE SET customer_data = $3,
|
||||||
|
override = 'automatic',
|
||||||
|
override_by = NULL,
|
||||||
|
override_at = NULL`
|
||||||
return db.none(sql, [customerId, infoRequestId, data])
|
return db.none(sql, [customerId, infoRequestId, data])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue