fix: infinite loop on rejected id photo and front camera photo
This commit is contained in:
parent
86e0529212
commit
796fb3ac88
1 changed files with 8 additions and 4 deletions
|
|
@ -264,16 +264,20 @@ function getComplianceTypes () {
|
|||
function updateOverride (fields) {
|
||||
const updateableFields = [
|
||||
'id_card_data',
|
||||
'id_card_photo',
|
||||
'front_camera',
|
||||
'id_card_photo_path',
|
||||
'front_camera_path',
|
||||
'authorized',
|
||||
'us_ssn'
|
||||
]
|
||||
|
||||
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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue