fix: infinite loop on rejected id photo and front camera photo
This commit is contained in:
parent
c573517ca4
commit
496a677b77
1 changed files with 8 additions and 4 deletions
|
|
@ -263,16 +263,20 @@ function getComplianceTypes () {
|
||||||
function updateOverride (fields) {
|
function updateOverride (fields) {
|
||||||
const updateableFields = [
|
const updateableFields = [
|
||||||
'id_card_data',
|
'id_card_data',
|
||||||
'id_card_photo',
|
'id_card_photo_path',
|
||||||
'front_camera',
|
'front_camera_path',
|
||||||
'authorized',
|
'authorized',
|
||||||
'us_ssn'
|
'us_ssn'
|
||||||
]
|
]
|
||||||
|
|
||||||
const updatedFields = _.intersection(updateableFields, _.keys(fields))
|
const updatedFields = _.intersection(updateableFields, _.keys(fields))
|
||||||
const atFields = _.fromPairs(_.map(f => [`${f}_override`, 'automatic'], updatedFields))
|
const overrideFields = _.fromPairs(_.map(f =>
|
||||||
|
_.endsWith('_path', f)
|
||||||
|
? [`${_.replace('_path', '', f)}_override`, 'automatic']
|
||||||
|
: [`${f}_override`, 'automatic']
|
||||||
|
, updatedFields))
|
||||||
|
|
||||||
return _.merge(fields, atFields)
|
return _.merge(fields, overrideFields)
|
||||||
}
|
}
|
||||||
|
|
||||||
function enhanceAtFields (fields) {
|
function enhanceAtFields (fields) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue