Skip to content

Commit

Permalink
returns all media types to prior form multipart
Browse files Browse the repository at this point in the history
  • Loading branch information
Yannick Chabbert committed Aug 7, 2019
1 parent ab6444a commit 2432989
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/drf_yasg/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,11 +373,7 @@ def get_consumes(parser_classes):
parser_classes = get_object_classes(parser_classes)
parser_classes = [pc for pc in parser_classes if not issubclass(pc, FileUploadParser)]
media_types = [parser.media_type for parser in parser_classes or []]
non_form_media_types = [encoding for encoding in media_types if not is_form_media_type(encoding)]
if len(non_form_media_types) == 0:
return media_types
else:
return non_form_media_types
return media_types


def get_produces(renderer_classes):
Expand Down

0 comments on commit 2432989

Please sign in to comment.