Fix flake8 E302 errors.

This commit is contained in:
Aaron Tan
2016-11-15 20:59:39 -05:00
parent 7dddae1254
commit 9e4655419e
165 changed files with 1117 additions and 119 deletions

View File

@@ -40,6 +40,7 @@ class JSONField(upstream_JSONField):
# Based on AutoOneToOneField from django-annoying:
# https://bitbucket.org/offline/django-annoying/src/a0de8b294db3/annoying/fields.py
class AutoSingleRelatedObjectDescriptor(SingleRelatedObjectDescriptor):
"""Descriptor for access to the object from its related class."""
@@ -56,6 +57,7 @@ class AutoSingleRelatedObjectDescriptor(SingleRelatedObjectDescriptor):
obj.save()
return obj
class AutoOneToOneField(models.OneToOneField):
"""OneToOneField that creates related object if it doesn't exist."""