Skip to content

Commit

Permalink
gaarf-py: fix(cli): applying fix from #17, account id from a config s…
Browse files Browse the repository at this point in the history
…hould not be overwritten by login_customer_id from google-ads.yaml

Change-Id: Ib3965afc0ca4234d6e002b75bd249423af7365dd
  • Loading branch information
evil-shrike committed Mar 29, 2023
1 parent 7f96b3d commit 710b769
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions py/gaarf/cli/gaarf.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,13 @@ def main():
config = GaarfConfigBuilder(args).build()
if account := main_args.customer_id:
config.account = account
elif mcc := google_ads_config_dict.get("login_customer_id"):
config.account = str(mcc)
else:
raise ValueError(
"No account found, please specify via --account CLI flag"
"or add as login_customer_id in google-ads.yaml")
if not config.account:
if mcc := google_ads_config_dict.get("login_customer_id"):
config.account = str(mcc)
else:
raise ValueError(
"No account found, please specify via --account CLI flag"
"or add as login_customer_id in google-ads.yaml")
logger.debug("config: %s", config)

if main_args.save_config and not main_args.gaarf_config:
Expand Down

0 comments on commit 710b769

Please sign in to comment.