Skip to content

Commit

Permalink
fix required not trageted input
Browse files Browse the repository at this point in the history
  • Loading branch information
milesstoetzner committed Dec 26, 2024
1 parent e397800 commit cdebc6b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/resolver/validator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,11 @@ export default class Validator {
* Required Constraint: input is required if not targeted by any dependency
*/
if (!this.isTargeted(name, inputs)) {
this.minisat.require(name)
const value =
this.inputs[name] ??
this.graph.serviceTemplate.topology_template?.variability?.inputs?.[name]?.default ??
undefined
assert.isDefined(value, `Variability input "${name}" is not targeted and not assigned`)
}

/**
Expand Down

0 comments on commit cdebc6b

Please sign in to comment.