summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bitbake/lib/toaster/orm/models.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py
index 3da9a66d0c..1c9f3a9363 100644
--- a/bitbake/lib/toaster/orm/models.py
+++ b/bitbake/lib/toaster/orm/models.py
@@ -21,7 +21,7 @@
21 21
22from __future__ import unicode_literals 22from __future__ import unicode_literals
23 23
24from django.db import models, IntegrityError 24from django.db import models, IntegrityError, DataError
25from django.db.models import F, Q, Sum, Count 25from django.db.models import F, Q, Sum, Count
26from django.utils import timezone 26from django.utils import timezone
27from django.utils.encoding import force_bytes 27from django.utils.encoding import force_bytes
@@ -78,7 +78,7 @@ if 'sqlite' in settings.DATABASES['default']['ENGINE']:
78 try: 78 try:
79 obj = self.create(**params) 79 obj = self.create(**params)
80 return obj, True 80 return obj, True
81 except IntegrityError: 81 except (IntegrityError, DataError):
82 exc_info = sys.exc_info() 82 exc_info = sys.exc_info()
83 try: 83 try:
84 return self.get(**lookup), False 84 return self.get(**lookup), False