diff --git a/rest_framework/permissions.py b/rest_framework/permissions.py index 71de226f98..7c15eca589 100644 --- a/rest_framework/permissions.py +++ b/rest_framework/permissions.py @@ -54,6 +54,9 @@ def __eq__(self, other): self.op2_class == other.op2_class ) + def __hash__(self): + return hash((self.operator_class, self.op1_class, self.op2_class)) + class AND: def __init__(self, op1, op2):