Skip to content

Commit

Permalink
Grrr
Browse files Browse the repository at this point in the history
  • Loading branch information
romain-intel committed Jan 8, 2025
1 parent a4ae072 commit 05fb38e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
6 changes: 5 additions & 1 deletion metaflow/plugins/events_decorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,11 @@ def flow_init(
"You cannot pass %s as both a command-line argument and an attribute "
"of the @trigger_on_finish decorator." % op
)
trigger_option = self.attributes.get("trigger", options["trigger"])
if "trigger" in self._user_defined_attributes:
trigger_option = self.attributes["trigger"]
else:
trigger_option = options["trigger"]

self._option_values = options
if trigger_option:
from metaflow import Run
Expand Down
12 changes: 10 additions & 2 deletions metaflow/plugins/project_decorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,16 @@ def flow_init(
"You cannot pass %s as both a command-line argument and an attribute "
"of the @project decorator." % op
)
project_branch = self.attributes.get("branch", options["branch"])
project_production = self.attributes.get("production", options["production"])
if "branch" in self._user_defined_attributes:
project_branch = self.attributes["branch"]
else:
project_branch = options["branch"]

if "production" in self._user_defined_attributes:
project_production = self.attributes["production"]
else:
project_production = options["production"]

project_flow_name, branch_name = format_name(
flow.name,
project_name,
Expand Down

0 comments on commit 05fb38e

Please sign in to comment.