12 lines
234 B
Python
12 lines
234 B
Python
|
class FilterModule:
|
||
|
def filters(self):
|
||
|
return {
|
||
|
"choices": choices,
|
||
|
}
|
||
|
|
||
|
|
||
|
def choices(value, choices):
|
||
|
if value not in choices:
|
||
|
raise ValueError(f"{value} not in {choices}")
|
||
|
return value
|