We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a77f1b2 commit fa068cbCopy full SHA for fa068cb
star_resty/method/parser.py
@@ -67,12 +67,11 @@ def create_parser_from_data(data: Mapping) -> RequestParser:
67
parsers = []
68
async_parsers = []
69
for key, value in data.items():
70
- if is_dataclass(value):
+ parser = getattr(value, 'parser', None)
71
+ if parser is None and is_dataclass(value):
72
data = {field.name: field.type for field in fields(value)}
73
factory = partial(DataClassParser, value)
74
parser = create_parser_for_dc(data, factory=factory)
- else:
75
- parser = getattr(value, 'parser', None)
76
77
if parser is None or not isinstance(parser, (Parser, RequestParser)):
78
continue
0 commit comments