mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
?_hash=1 no longer respected for mutable databases
Closes #471, refs #419
This commit is contained in:
parent
cccea85be6
commit
db9dbfb816
2 changed files with 21 additions and 4 deletions
|
|
@ -208,7 +208,12 @@ class BaseView(RenderMixin):
|
|||
if "as_db" in kwargs:
|
||||
should_redirect += kwargs["as_db"]
|
||||
|
||||
if self.ds.config("hash_urls") or "_hash" in request.args:
|
||||
if (
|
||||
(self.ds.config("hash_urls") or "_hash" in request.args)
|
||||
and
|
||||
# Redirect only if database is immutable
|
||||
not self.ds.databases[name].is_mutable
|
||||
):
|
||||
return name, expected, correct_hash_provided, should_redirect
|
||||
|
||||
return name, expected, correct_hash_provided, None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue