diff --git a/src/tidewave/middleware.py b/src/tidewave/middleware.py index 1624fbb..f7ece3e 100644 --- a/src/tidewave/middleware.py +++ b/src/tidewave/middleware.py @@ -62,6 +62,8 @@ def __call__(self, environ: dict[str, Any], start_response: Callable): else: full_path = path_info + full_path = full_path.rstrip("/") + if full_path.startswith("/tidewave"): security_error = self._check_security(environ) if security_error: diff --git a/src/tidewave/sqlalchemy/models.py b/src/tidewave/sqlalchemy/models.py index da61865..43b6141 100644 --- a/src/tidewave/sqlalchemy/models.py +++ b/src/tidewave/sqlalchemy/models.py @@ -21,8 +21,12 @@ def get_models() -> str: if model is base_class: continue - # Check if it's an abstract model (has __abstract__ = True) - if getattr(model, "__abstract__", False): + # Check if it's an abstract model (has __abstract__ = True). + # Note that we check the dict instead of using getattr, + # so that we check the attribute on the specific model, + # otherwise we may access the attribute inherited from + # parent. + if model.__dict__.get("__abstract__", False): continue # Check if it has any columns (indicating it's a concrete model)