summaryrefslogtreecommitdiff
path: root/tests/custom_pk/fields.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/custom_pk/fields.py')
-rw-r--r--tests/custom_pk/fields.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/custom_pk/fields.py b/tests/custom_pk/fields.py
index 2d70c6b6dc..245ede9bc8 100644
--- a/tests/custom_pk/fields.py
+++ b/tests/custom_pk/fields.py
@@ -19,6 +19,9 @@ class MyWrapper:
return self.value == other.value
return self.value == other
+ def __hash__(self):
+ return hash(self.value)
+
class MyWrapperField(models.CharField):
def __init__(self, *args, **kwargs):