Objects: Update enumeration method to is_valid_choice

This commit is contained in:
Mike Auty
2020-07-29 20:25:34 +01:00
committed by ikelos
parent 180eee569f
commit b04fd7c9bd
+1 -1
View File
@@ -467,7 +467,7 @@ class Enumeration(interfaces.objects.ObjectInterface, int):
return self._vol['choices']
@property
def legal(self) -> bool:
def is_valid_choice(self) -> bool:
"""Returns whether the value for the object is a valid choice"""
return self in self.choices.values()