Skip to content

Commit

Permalink
fix: error the session has an empty string saved
Browse files Browse the repository at this point in the history
  • Loading branch information
saemideluxe committed Oct 18, 2021
1 parent a8f50b3 commit f264415
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions bread/views/browse.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,8 @@ def get(self, *args, **kwargs):
return ret
# for normal GET requests save query if saving state is enabled or reload last state
if self.viewstate_sessionkey:
if (
not self.request.GET
and self.viewstate_sessionkey in self.request.session
if not self.request.GET and self.request.session.get(
self.viewstate_sessionkey, None
):
return redirect(
self.request.path
Expand Down

0 comments on commit f264415

Please sign in to comment.