Skip to content

Commit 313857e

Browse files
authored
Merge pull request #2168 from AnnMarieW/revert-2126
revert 2126 until fixed
2 parents 05c37e1 + 982d7d1 commit 313857e

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
55
## [UNRELEASED]
66

77
- [#2146](https://github.com/plotly/dash/pull/2146) Remove leftover debug console.log statement.
8+
- [#2168](https://github.com/plotly/dash/pull/2168) Reverts [#2126](https://github.com/plotly/dash/pull/2126) (supporting redirect from root when using pages) until the new bugs introduced by that PR are fixed.
89

910
### Updated
1011

dash/dash.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -556,8 +556,7 @@ def _handle_error(_):
556556
self._add_url("_dash-update-component", self.dispatch, ["POST"])
557557
self._add_url("_reload-hash", self.serve_reload_hash)
558558
self._add_url("_favicon.ico", self._serve_default_favicon)
559-
if not self.use_pages:
560-
self._add_url("", self.index)
559+
self._add_url("", self.index)
561560

562561
# catch-all for front-end routes, used by dcc.Location
563562
self._add_url("<path:path>", self.index)
@@ -2119,11 +2118,6 @@ def redirect():
21192118
fullname,
21202119
create_redirect_function(page["relative_path"]),
21212120
)
2122-
# set "/" if not redirected
2123-
try:
2124-
self._add_url("", self.index)
2125-
except AssertionError:
2126-
pass
21272121

21282122
def run_server(self, *args, **kwargs):
21292123
"""`run_server` is a deprecated alias of `run` and may be removed in a

tests/integration/test_pages_redirect_home.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import dash
2+
import pytest
23

34

45
def test_pare001_redirect_home(dash_duo):
6+
pytest.skip("Revisit later")
57

68
app = dash.Dash(__name__, use_pages=True, pages_folder="")
79

0 commit comments

Comments
 (0)