Skip to content

Commit 2fc98ce

Browse files
committed
fix: Fix bug with check empty type
1 parent 367939c commit 2fc98ce

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

fastapi_mason/filters/filters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ def __init__(self, data: Optional[Dict[str, Any]] = None):
176176

177177
def _validate_model(self):
178178
meta = getattr(self, 'Meta', None)
179-
if not meta or not getattr(meta, 'model', None) and type(self) is not FilterSet:
179+
if (not meta or not getattr(meta, 'model', None)) and not isinstance(self, EmptyFilterSet):
180180
raise ValueError(f'Meta.model must be specified for {self.__class__.__name__}')
181181

182182
@classmethod

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ requires = [ "hatchling" ]
55

66
[project]
77
name = "fastapi-mason"
8-
version = "0.3.0"
8+
version = "0.3.1"
99
description = "FastAPI Mason is a library for building FastAPI applications with a Django REST Framework-inspired architecture."
1010
readme = "README.md"
1111
keywords = [

0 commit comments

Comments
 (0)