Skip to content

Commit 4ebc811

Browse files
committed
fix: move Excluded check to validateMicroflowReferences (rebase fixup)
1 parent d680f33 commit 4ebc811

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

mdl/executor/validate.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,12 @@ func (e *Executor) Validate(stmt ast.Statement) error {
414414
// validateMicroflowReferences validates that all qualified name references in a
415415
// microflow body (pages, microflows, java actions, entities) point to existing objects.
416416
func validateMicroflowReferences(ctx *ExecContext, s *ast.CreateMicroflowStmt, sc *scriptContext) []string {
417+
if s.Excluded {
418+
// Studio Pro allows excluded documents to keep stale references. Reference
419+
// checks should not fail a roundtrip audit for microflows that are not part
420+
// of the runnable app.
421+
return nil
422+
}
417423
return validateFlowBodyReferences(ctx, s.Body, sc)
418424
}
419425

@@ -422,12 +428,6 @@ func validateFlowBodyReferences(ctx *ExecContext, body []ast.MicroflowStatement,
422428
if !ctx.Connected() || len(body) == 0 {
423429
return nil
424430
}
425-
if s.Excluded {
426-
// Studio Pro allows excluded documents to keep stale references. Reference
427-
// checks should not fail a roundtrip audit for microflows that are not part
428-
// of the runnable app.
429-
return nil
430-
}
431431

432432
refs := &flowRefCollector{}
433433
refs.collectFromStatements(body)

0 commit comments

Comments
 (0)