diff --git a/iati_datastore/iatilib/codelists/enum.py b/iati_datastore/iatilib/codelists/enum.py index de3f5ff..c770df0 100644 --- a/iati_datastore/iatilib/codelists/enum.py +++ b/iati_datastore/iatilib/codelists/enum.py @@ -13,6 +13,9 @@ def __init__(self, cls_, name, value, description): self.value = value self.description = description + def __hash__(self): + return hash(self.value) + def __reduce__(self): """Allow unpickling to return the symbol linked to the DeclEnum class."""