Skip to content

Commit

Permalink
[Bug] Ignore unexpected query parameters rather than raising an excep…
Browse files Browse the repository at this point in the history
…tion (#539)

Co-authored-by: Alexey Snigir <[email protected]>
  • Loading branch information
antonymilne and l0uden authored Jun 21, 2024
1 parent e7c1181 commit af12fc6
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-integration-vizro-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
# If these are fixed then this whole step can be removed.
- name: Install Chrome and chromedriver
run: |
export chrome_version=119.0.6045.105
export chrome_version=125.0.6422.141
sudo apt-get update || true
sudo apt-get install libu2f-udev -y
wget "https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_$chrome_version-1_amd64.deb"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<!--
A new scriv changelog fragment.
Uncomment the section that is right (remove the HTML comment wrapper).
-->

<!--
### Highlights ✨
- A bullet item for the Highlights ✨ category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))
-->
<!--
### Removed
- A bullet item for the Removed category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))
-->
<!--
### Added
- A bullet item for the Added category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))
-->
<!--
### Changed
- A bullet item for the Changed category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))
-->
<!--
### Deprecated
- A bullet item for the Deprecated category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))
-->

### Fixed

- Ignore unexpected query parameters rather than raising an exception ([#539](https://github.com/mckinsey/vizro/pull/539))

<!--
### Security
- A bullet item for the Security category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))
-->
4 changes: 3 additions & 1 deletion vizro-core/src/vizro/models/_dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,9 @@ def _arrange_page_divs(self, page_divs: _PageDivsType):
page_main = html.Div(id="page-main", children=[collapsable_left_side, collapsable_icon, right_side])
return html.Div(children=[page_header, page_main], className="page-container")

def _make_page_layout(self, page: Page):
def _make_page_layout(self, page: Page, **kwargs):
# **kwargs are not used but ensure that unexpected query parameters do not raise errors. See
# https://github.com/AnnMarieW/dash-multi-page-app-demos/#5-preventing-query-string-errors
page_divs = self._get_page_divs(page=page)
page_layout = self._arrange_page_divs(page_divs=page_divs)
page_layout.id = page.id
Expand Down

0 comments on commit af12fc6

Please sign in to comment.