Skip to content
This repository has been archived by the owner on Nov 9, 2021. It is now read-only.

strip slash from url when adding new endpoint #87

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

strip slash from url when adding new endpoint #87

wants to merge 1 commit into from

Conversation

volaya
Copy link

@volaya volaya commented Jul 22, 2021

No description provided.

@koyo-jakanees
Copy link

koyo-jakanees commented Jul 22, 2021

Victor i tried the quick fix for urls. (dev branch) got this.

Traceback (most recent call last):
              File "/home/user/.local/share/QGIS/QGIS3/profiles/default/python/plugins/stac_browser/controllers/add_edit_api_dialog.py", line 75, in on_api_success
              self.hooks['add_api'](api)
              File "/home/user/.local/share/QGIS/QGIS3/profiles/default/python/plugins/stac_browser/controllers/configure_apis_dialog.py", line 77, in add_api
              api = api.strip("/")
             AttributeError: 'API' object has no attribute 'strip'

I have noticed the same issue with most urls if trailing slash is included.
Quick Fix:
controller/add_edit_api_dialog.py

    def on_save_add_clicked(self):
        self.set_all_enabled(False)
        .............
        api = API({'id': api_id, 'href': self.urlEditBox.text().strip("/")})

works fine

koyo-jakanees added a commit to koyo-jakanees/qgis-stac-browser that referenced this pull request Jul 22, 2021
@volaya
Copy link
Author

volaya commented Jul 22, 2021

right, my fault. Thanks for the fix

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

Successfully merging this pull request may close these issues.

2 participants