Skip to content

Commit

Permalink
fix(RemoteFrappeSite): Make method more robust
Browse files Browse the repository at this point in the history
  • Loading branch information
cogk committed Nov 29, 2024
1 parent 58bd325 commit 16eb010
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion press/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,8 @@ def _validate_frappe_site(self):
frappe.throw("Invalid Frappe Site")

if res.json().get("message") == "pong":
url = res.url.split("/api")[0]
# Get final redirect URL
url = res.url.split("/api/method")[0]

Check warning on line 343 in press/utils/__init__.py

View check run for this annotation

Codecov / codecov/patch

press/utils/__init__.py#L343

Added line #L343 was not covered by tests
self._site = url

def _validate_user_permissions(self):
Expand Down

0 comments on commit 16eb010

Please sign in to comment.