Improve error message when model does not have any docstring

issue4390
review12921002
This commit is contained in:
Sergi Almacellas Abellana committed 2015-02-04 23:16:11 +01:00
1 parent 288dc51876
commit c4e96f4a08
1 file changed
+1
+1
View File
@@ -92,6 +92,7 @@ class Model(WarningErrorMixin, URLMixin, PoolBase):
'''
Returns the first non-empty line of the model docstring.
'''
assert cls.__doc__, '%s has no docstring' % cls
lines = cls.__doc__.splitlines()
for line in lines:
line = line.strip()