refactor: suspensionDays only on suspend triggers
This commit is contained in:
parent
ca86a70d42
commit
dd7dc68323
1 changed files with 3 additions and 4 deletions
|
|
@ -357,19 +357,18 @@ function migrateComplianceTriggers (config) {
|
|||
function createTrigger (
|
||||
requirement,
|
||||
threshold,
|
||||
suspensionDays = null
|
||||
suspensionDays
|
||||
) {
|
||||
const triggerConfig = {
|
||||
id: uuid.v4(),
|
||||
direction: 'both',
|
||||
suspensionDays: suspensionDays,
|
||||
threshold,
|
||||
thresholdDays: 1,
|
||||
triggerType: triggerTypes.volume,
|
||||
requirement
|
||||
}
|
||||
|
||||
return triggerConfig
|
||||
if (!requirement === 'suspend') return triggerConfig
|
||||
return _.assign(triggerConfig, { suspensionDays })
|
||||
}
|
||||
|
||||
const codes = [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue