Skip to content

Commit

Permalink
Do not call add_manual_fields twice
Browse files Browse the repository at this point in the history
  • Loading branch information
axnsan12 committed Jun 16, 2018
1 parent 4c6f087 commit a96bcf5
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/drf_yasg/inspectors/field.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,7 @@ def add_manual_fields(self, serializer, schema):
setattr(schema, attr, val)

def get_schema(self, serializer):
result = self.probe_field_inspectors(serializer, openapi.Schema, self.use_definitions)
schema = openapi.resolve_ref(result, self.components)
self.add_manual_fields(serializer, schema)
return result
return self.probe_field_inspectors(serializer, openapi.Schema, self.use_definitions)

def add_manual_parameters(self, serializer, parameters):
"""Add/replace parameters from the given list of automatically generated request parameters. This method
Expand Down

0 comments on commit a96bcf5

Please sign in to comment.