Skip to content

Commit

Permalink
fix duplicate save_api_key_to_env call
Browse files Browse the repository at this point in the history
  • Loading branch information
joshbickett committed Jan 19, 2024
1 parent 9c9842b commit 9ba17f4
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions operate/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,6 @@ def prompt_and_save_api_key(self, key_name, key_description):
load_dotenv() # Reload environment variables
# Update the instance attribute with the new key

if key_value:
self.save_api_key_to_env(key_name, key_value)
load_dotenv() # Reload environment variables
setattr(self, key_name.lower(), key_value)

@staticmethod
def save_api_key_to_env(key_name, key_value):
with open(".env", "a") as file:
Expand Down

0 comments on commit 9ba17f4

Please sign in to comment.