Skip to content

Commit

Permalink
Bug catching
Browse files Browse the repository at this point in the history
Caught a bug in my email-config.py script where it wasn't returning is_userpool_exist properly. Let's see if this fixes things.
  • Loading branch information
nataliejschultz committed Apr 18, 2024
1 parent 0780d90 commit 4777aaf
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions configs/wyoming-original.nrel-op.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,4 @@
"data_trajectories_columns_exclude": ["user_id"]
}
}

1 change: 1 addition & 0 deletions configs/wyoming.nrel-op.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,4 @@
]
}
}

3 changes: 2 additions & 1 deletion email_automation/email-config.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,9 @@ def get_userpool_name(pool_name, cognito_client):
is_userpool_exist = False
user_pools = [user_pool["Name"] for user_pool in response["UserPools"]]
is_userpool_exist = True if pool_name in user_pools else False
print("does the pool exist?", is_userpool_exist)
user_pool_index = user_pools.index(pool_name) if is_userpool_exist else None
pool_id = response["UserPools"][user_pool_index]["Id"]
pool_id = response["UserPools"][user_pool_index]["Id"] if is_userpool_exist else None
return is_userpool_exist, pool_id

def get_users(pool_id, cognito_client):
Expand Down

0 comments on commit 4777aaf

Please sign in to comment.