mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-15 02:20:38 +09:00
fix(routines): address Greptile review findings
Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
parent
38a0cd275e
commit
fd6cfc7149
5 changed files with 77 additions and 21 deletions
|
|
@ -213,7 +213,13 @@ function sanitizeRoutineVariableInputs(
|
|||
function assertScheduleCompatibleVariables(variables: RoutineVariable[]) {
|
||||
const missingDefaults = variables
|
||||
.filter((variable) => variable.required)
|
||||
.filter((variable) => isMissingRoutineVariableValue(normalizeRoutineVariableValue(variable, variable.defaultValue)))
|
||||
.filter((variable) => {
|
||||
try {
|
||||
return isMissingRoutineVariableValue(normalizeRoutineVariableValue(variable, variable.defaultValue));
|
||||
} catch {
|
||||
return true;
|
||||
}
|
||||
})
|
||||
.map((variable) => variable.name);
|
||||
if (missingDefaults.length > 0) {
|
||||
throw unprocessable(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue