diff --git a/emmett/forms.py b/emmett/forms.py index bc0edb0e..77e5ee84 100644 --- a/emmett/forms.py +++ b/emmett/forms.py @@ -384,8 +384,8 @@ async def _process(self, **kwargs): #: handle uploads for field in filter(lambda f: f.type == "upload", self.writable_fields): upload = self.files[field.name] - del_field = field.name + "__del" - if not upload.filename: + if not upload: + del_field = field.name + "__del" if self.input_params.get(del_field, False): self.params[field.name] = self.table[field.name].default or "" # TODO: do we want to physically delete file? diff --git a/pyproject.toml b/pyproject.toml index be0f2f6d..e337cd2c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -35,7 +35,7 @@ classifiers = [ dependencies = [ "click>=6.0", - "emmett-core[granian,rapidjson]~=1.0.2", + "emmett-core[granian,rapidjson]~=1.0.4", "emmett-pydal==17.3.1", "pendulum~=3.0.0", "pyyaml~=6.0",