This commit is contained in:
Roman Vasilyev 2017-06-06 15:26:48 +00:00 committed by GitHub
commit d4d73ea249

View File

@ -524,6 +524,9 @@ class SchemaGenerator(object):
model = getattr(getattr(view, 'queryset', None), 'model', None) model = getattr(getattr(view, 'queryset', None), 'model', None)
fields = [] fields = []
if not hasattr(uritemplate, 'variables'):
return fields
for variable in uritemplate.variables(path): for variable in uritemplate.variables(path):
title = '' title = ''
description = '' description = ''