|
@@ -1,6 +1,6 @@
|
|
|
from dataclasses import dataclass
|
|
|
from abc import ABC, abstractmethod
|
|
|
-from typing import Any, Union, Type, Iterable
|
|
|
+from typing import Any, Union, Type, Iterable, Optional
|
|
|
|
|
|
from sqlmodel import SQLModel
|
|
|
|
|
@@ -136,7 +136,7 @@ class OptionalFilter(MetaFilter):
|
|
|
is_optional = optional == self.ALL or key in optional
|
|
|
|
|
|
if is_fields and is_optional:
|
|
|
- annots[key] = value | None
|
|
|
+ annots[key] = Optional[value]
|
|
|
|
|
|
attrs['__annotations__'] = annots
|
|
|
|