Skip to content

Commit

Permalink
Merge pull request #289 from roboflow/api_key_precedence
Browse files Browse the repository at this point in the history
remove loading api key from env variable when initializing api key
  • Loading branch information
ryanjball authored Jul 17, 2024
2 parents e135c40 + 1d35d37 commit aac400d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions roboflow/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from roboflow.models import CLIPModel, GazeModel # noqa: F401
from roboflow.util.general import write_line

__version__ = "1.1.35"
__version__ = "1.1.36"


def check_key(api_key, model, notebook, num_retries=0):
Expand Down Expand Up @@ -239,8 +239,7 @@ def workspace(self, the_workspace=None):
the_workspace = self.current_workspace

if self.api_key: # Check if api_key was passed during __init__
workspace_api_key = load_roboflow_api_key(the_workspace)
api_key = workspace_api_key or self.api_key
api_key = self.api_key
list_projects = rfapi.get_workspace(api_key, the_workspace)
return Workspace(list_projects, api_key, the_workspace, self.model_format)

Expand Down

0 comments on commit aac400d

Please sign in to comment.