summaryrefslogtreecommitdiff
path: root/tests/admin_widgets/models.py
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2018-01-31 13:43:05 -0500
committerTim Graham <timograham@gmail.com>2018-02-01 08:46:13 -0500
commit1bd45e24584286075f4ff6cbeff2437c77e2c762 (patch)
tree6dadd83ce0a9ff1b08df0c94a6e4b6c748863292 /tests/admin_widgets/models.py
parent6cbb9b4096c11d975f198f6f1814f8bb95000705 (diff)
[2.0.x] Fixed #29094 -- Fixed crash when entering an invalid uuid in ModelAdmin.raw_id_fields.
Regression in 2f9861d823620da7ecb291a8f005f53da12b1e89. Thanks Carel Burger for the report and fix. Backport of 552abffab16cbdff571486b683e7e7ef12e46066 from master
Diffstat (limited to 'tests/admin_widgets/models.py')
-rw-r--r--tests/admin_widgets/models.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/admin_widgets/models.py b/tests/admin_widgets/models.py
index bd00b114d3..5fc9f13e96 100644
--- a/tests/admin_widgets/models.py
+++ b/tests/admin_widgets/models.py
@@ -1,3 +1,5 @@
+import uuid
+
from django.contrib.auth.models import User
from django.db import models
@@ -92,6 +94,7 @@ class CarTire(models.Model):
class Honeycomb(models.Model):
+ id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
location = models.CharField(max_length=20)