Skip to content

Commit

Permalink
Update swagger.py
Browse files Browse the repository at this point in the history
  • Loading branch information
edivergis committed Dec 17, 2019
1 parent 9f16d92 commit 365f6ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion flask_restplus/swagger.py
Original file line number Diff line number Diff line change
Expand Up @@ -582,9 +582,9 @@ def register_model(self, model):
name = model.name if isinstance(model, ModelBase) else model
if name not in self.api.models:
raise ValueError('Model {0} not registered'.format(name))
specs = self.api.models[name]
if name in self._registered_models:
return ref(model)
specs = self.api.models[name]
self._registered_models[name] = specs
if isinstance(specs, ModelBase):
for parent in specs.__parents__:
Expand Down

0 comments on commit 365f6ef

Please sign in to comment.