diff --git a/emmett/__version__.py b/emmett/__version__.py index e5e59e38..fab833f3 100644 --- a/emmett/__version__.py +++ b/emmett/__version__.py @@ -1 +1 @@ -__version__ = "2.6.0" +__version__ = "2.6.1" diff --git a/emmett/forms.py b/emmett/forms.py index fd0b87aa..bc0edb0e 100644 --- a/emmett/forms.py +++ b/emmett/forms.py @@ -394,7 +394,7 @@ async def _process(self, **kwargs): self.params[field.name] = self.record[field.name] continue else: - source_file, original_filename = upload.stream, upload.filename + source_file, original_filename = upload, upload.filename newfilename = field.store(source_file, original_filename, field.uploadfolder) if isinstance(field.uploadfield, str): self.params[field.uploadfield] = source_file.read() diff --git a/emmett/routing/response.py b/emmett/routing/response.py index 2b6d1407..a1c23cd8 100644 --- a/emmett/routing/response.py +++ b/emmett/routing/response.py @@ -65,8 +65,6 @@ def process(self, output: Any, response) -> str: return self.route.app.templater.render(self.route.template, output) except TemplateMissingError as exc: raise HTTPStringResponse(404, body="{}\n".format(exc.message), cookies=response.cookies) - elif isinstance(output, str): - return output - elif isinstance(output, HTTPResponse): + if isinstance(output, str): return output return str(output) diff --git a/pyproject.toml b/pyproject.toml index 9be56797..f63d9aff 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "emmett" -version = "2.6.0" +version = "2.6.1" description = "The web framework for inventors" readme = "README.md" license = "BSD-3-Clause" @@ -35,7 +35,7 @@ classifiers = [ dependencies = [ "click>=6.0", - "emmett-core[granian,rapidjson]~=1.0.1", + "emmett-core[granian,rapidjson]~=1.0.2", "emmett-pydal==17.3.1", "pendulum~=3.0.0", "pyyaml~=6.0",