Skip to content

Commit

Permalink
check length before using it here
Browse files Browse the repository at this point in the history
  • Loading branch information
tonylampada committed Jan 5, 2024
1 parent 3fefe2a commit 2659ef7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion roboflow/models/classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,9 @@ def __generate_url(self):
# Generates URL based on all parameters
splitted = self.id.rsplit("/")
without_workspace = splitted[1]
version = self.version or splitted[2]
version = self.version
if not version and len(splitted) > 2:
version = splitted[2]

self.api_url = "".join(
[
Expand Down

0 comments on commit 2659ef7

Please sign in to comment.