diff --git a/datasette/app.py b/datasette/app.py index 545a65c8..139e4c34 100644 --- a/datasette/app.py +++ b/datasette/app.py @@ -625,9 +625,12 @@ class Datasette: return action return None - async def refresh_schemas(self): + async def refresh_schemas(self, *, force=False): # Throttle schema refreshes to at most once per second - if time.monotonic() - getattr(self, "_last_schema_refresh", 0) < 1.0: + if ( + not force + and time.monotonic() - getattr(self, "_last_schema_refresh", 0) < 1.0 + ): return self._last_schema_refresh = time.monotonic() if self._refresh_schemas_lock.locked(): diff --git a/datasette/templates/execute_write.html b/datasette/templates/execute_write.html index 949850ed..0d0a9931 100644 --- a/datasette/templates/execute_write.html +++ b/datasette/templates/execute_write.html @@ -93,20 +93,25 @@ form.sql.core input[data-execute-write-submit]:disabled { {% endif %}