Skip to content

Commit

Permalink
Fixed issue with local server builds (#212)
Browse files Browse the repository at this point in the history
  • Loading branch information
JR-Morgan authored Nov 22, 2024
1 parent a456cdf commit 4995f02
Show file tree
Hide file tree
Showing 2 changed files with 187 additions and 176 deletions.
14 changes: 11 additions & 3 deletions bpy_speckle/operators/streams.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,17 @@

def get_project_workspace_id(client: SpeckleClient, project_id: str) -> Optional[str]:
workspace_id = None
server_version = client.project.server_version or client.server.verison()
maj = server_version[0]
min = server_version[1]
server_version = client.project.server_version or client.server.version()

# Local yarn builds of server will report a server version if "dev"
# We'll assume that local builds are up-to-date with the latest features
if server_version[0] == "dev":
maj = 999
min = 999
else:
maj = server_version[0]
min = server_version[1]

if maj > 2 or (maj == 2 and min > 20):
workspace_id = client.project.get(project_id).workspaceId
return workspace_id
Expand Down
Loading

0 comments on commit 4995f02

Please sign in to comment.