class CommaSeparatedIntegerField(forms.Field):
def to_python(self, value: Any | None) -> list[int]: # Any | None from super -> do not override
if value is None or not value.strip():
return []
return [int(item.strip()) for item in value.split(",")]
Broke on this input: invalid literal for int() with base 10: 'if(now()=sysdate()'
Last line of this code:
Broke on this input:
invalid literal for int() with base 10: 'if(now()=sysdate()'
Very funny.