Skip to content

Commit 6e6a11e

Browse files
committed
Address bug in project branch mapping for static triggers
1 parent ef5c89e commit 6e6a11e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

metaflow/plugins/events_decorator.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,9 @@ def flow_init(
422422
)
423423
if "project_branch" in self.attributes["flow"]:
424424
if is_stringish(self.attributes["flow"]["project_branch"]):
425-
result["branch"] = self.attributes["flow"]["project_branch"]
425+
result["project_branch"] = self.attributes["flow"][
426+
"project_branch"
427+
]
426428
else:
427429
raise MetaflowException(
428430
"The *project_branch* attribute of the *flow* is not a string"
@@ -467,6 +469,7 @@ def flow_init(
467469
"The *name* attribute '%s' is not a valid string"
468470
% str(flow_name)
469471
)
472+
470473
result = {"fq_name": flow_name}
471474
if "project" in flow:
472475
if is_stringish(flow["project"]):
@@ -478,7 +481,7 @@ def flow_init(
478481
)
479482
if "project_branch" in flow:
480483
if is_stringish(flow["project_branch"]):
481-
result["branch"] = flow["project_branch"]
484+
result["project_branch"] = flow["project_branch"]
482485
else:
483486
raise MetaflowException(
484487
"The *project_branch* attribute of the *flow* %s "

0 commit comments

Comments
 (0)