File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 1
1
"""Django Ninja Extra - Class Based Utility and more for Django Ninja(Fast Django REST framework)"""
2
2
3
- __version__ = "0.22.5 "
3
+ __version__ = "0.22.6 "
4
4
5
5
import django
6
6
Original file line number Diff line number Diff line change 11
11
from ninja_extra .interfaces .ordering import OrderingBase
12
12
from ninja_extra .interfaces .route_context import RouteContextBase
13
13
from ninja_extra .interfaces .searching import SearchingBase
14
+ from ninja_extra .lazy import LazyStrImport
14
15
15
16
_GenericModelValidator = AllowTypeOfSource (
16
- validator = lambda source , value : isinstance (value , type )
17
- and issubclass (value , source ),
17
+ validator = lambda source , value : (
18
+ isinstance (value , LazyStrImport )
19
+ or isinstance (value , type )
20
+ and issubclass (value , source )
21
+ ),
18
22
error_message = lambda source ,
19
23
value : f"Expected type of { source .__name__ } , received: { type (value )} " ,
20
24
)
You can’t perform that action at this time.
0 commit comments