Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: absolute urls #5

Merged
merged 13 commits into from
Jan 17, 2024
Merged

feat: absolute urls #5

merged 13 commits into from
Jan 17, 2024

Conversation

mamico
Copy link
Contributor

@mamico mamico commented May 19, 2023

No description provided.

@mamico mamico requested a review from cekk May 19, 2023 12:01
@mamico
Copy link
Contributor Author

mamico commented May 25, 2023

Actually, there may be some problems if the site is published with a legacy restapi traverser (ie /api)

@cekk cekk merged commit 27513d5 into main Jan 17, 2024
11 checks passed
@cekk cekk deleted the absolute_url branch January 17, 2024 12:53
return data

def get_portal_url(self):
portal_url = api.portal.get().absolute_url()
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
portal_url = api.portal.get().absolute_url()
portal_url = api.portal.get().absolute_url()
# BBB
if portal_url.endswith("/api"):
portal_url = portal_url[:4]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants