Kaydet (Commit) fc79c3fb authored tarafından Shai Berger's avatar Shai Berger

Flake8 corrections

üst d181384e
...@@ -956,10 +956,9 @@ class SQLUpdateCompiler(SQLCompiler): ...@@ -956,10 +956,9 @@ class SQLUpdateCompiler(SQLCompiler):
val = val.prepare_database_save(field) val = val.prepare_database_save(field)
else: else:
raise TypeError("Database is trying to update a relational field " raise TypeError("Database is trying to update a relational field "
"of type %s with a value of type %s. Make sure " "of type %s with a value of type %s. Make sure "
"you are setting the correct relations" % "you are setting the correct relations" %
(field.__class__.__name__, (field.__class__.__name__, val.__class__.__name__))
val.__class__.__name__))
else: else:
val = field.get_db_prep_save(val, connection=self.connection) val = field.get_db_prep_save(val, connection=self.connection)
......
...@@ -3,7 +3,6 @@ from __future__ import unicode_literals ...@@ -3,7 +3,6 @@ from __future__ import unicode_literals
from django.core.checks import Error from django.core.checks import Error
from django.db import models from django.db import models
from django.db.models.fields import FieldDoesNotExist
from django.test.utils import override_settings from django.test.utils import override_settings
from django.test.testcases import skipIfDBFeature from django.test.testcases import skipIfDBFeature
......
...@@ -48,6 +48,7 @@ class Whiz(models.Model): ...@@ -48,6 +48,7 @@ class Whiz(models.Model):
class BigD(models.Model): class BigD(models.Model):
d = models.DecimalField(max_digits=38, decimal_places=30) d = models.DecimalField(max_digits=38, decimal_places=30)
class FloatModel(models.Model): class FloatModel(models.Model):
size = models.FloatField() size = models.FloatField()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment