summaryrefslogtreecommitdiff
path: root/tests/custom_pk
diff options
context:
space:
mode:
authorJacob Walls <jacobtylerwalls@gmail.com>2025-06-09 12:32:55 -0400
committerGitHub <noreply@github.com>2025-06-09 18:32:55 +0200
commit8fd21b0da35697591e86f4eab0035c4360a45144 (patch)
tree84fb976d1da742fb0b674edf330326bf362c2205 /tests/custom_pk
parentc1fa3fdd040718356e5a3b9a0fe699d73f47a940 (diff)
Refs #10785 -- Added missing __hash__() method to custom pk test model.
Diffstat (limited to 'tests/custom_pk')
-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):