Skip to content

Commit

Permalink
fix(Connections): specify connection workspace (#170)
Browse files Browse the repository at this point in the history
  • Loading branch information
cheikhgwane authored Jun 25, 2024
1 parent 841f47c commit f8b2dda
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions openhexa/sdk/workspaces/current_workspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ def get_connection(
if self._connected:
response = graphql(
"""
query getConnection($slug: String!) {
connectionBySlug(slug: $slug) {
query getConnection($workspaceSlug:String!, $connectionSlug: String!) {
connectionBySlug(workspaceSlug:$workspaceSlug, connectionSlug: $connectionSlug) {
type
fields {
code
Expand All @@ -196,7 +196,7 @@ def get_connection(
}
}
""",
{"slug": identifier},
{"workspaceSlug": self.slug, "connectionSlug": identifier},
)
data = response["connectionBySlug"]
if data is None:
Expand Down
1 change: 1 addition & 0 deletions tests/test_workspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ def setup_method(self, monkeypatch):
"""Basics setup for the TestConnectedWorkspace."""
# Mock the class variable
monkeypatch.setenv("HEXA_SERVER_URL", "http://app.openhexa.test")
monkeypatch.setenv("HEXA_WORKSPACE", "workspace")

def test_workspace_files_path(self, monkeypatch, workspace):
"""Basic checks for the Workspace.files_path() method."""
Expand Down

0 comments on commit f8b2dda

Please sign in to comment.