Ignore None return from get_operation

This commit is contained in:
Cristi Vîjdea
2018-05-14 18:36:44 +03:00
parent 23ebe2ff3e
commit ae5eeeb600
2 changed files with 11 additions and 3 deletions
+3 -1
View File
@@ -324,7 +324,9 @@ class OpenAPISchemaGenerator(object):
if not public and not self._gen.has_view_permissions(path, method, view):
continue
operations[method.lower()] = self.get_operation(view, path, prefix, method, components, request)
operation = self.get_operation(view, path, prefix, method, components, request)
if operation is not None:
operations[method.lower()] = operation
if operations:
# since the common prefix is used as the API basePath, it must be stripped