Skip to content

Commit

Permalink
Fix: Provide usage of Enums as dict keys.
Browse files Browse the repository at this point in the history
  • Loading branch information
onegreyonewhite committed Feb 12, 2023
1 parent 9286033 commit 198dfb0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/drf_yasg/openapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def _as_odict(obj, memo):
if not isinstance(obj, dict):
items = sorted(items)
for attr, val in items:
result[attr] = SwaggerDict._as_odict(val, memo)
result[SwaggerDict._as_odict(attr, memo)] = SwaggerDict._as_odict(val, memo)
return result
elif isinstance(obj, str):
return force_real_str(obj)
Expand Down

0 comments on commit 198dfb0

Please sign in to comment.