response
response copied to clipboard
Possible to add a notification with a name that's too long
It's currently possible to create a notification handler with a function name too long to fit in the key column in the notifications database table.
Recommendations of fixes, either:
- Convert to
TextField, on Postgres at least there's essentially no performance benefit of using aCharFieldwith a cap over aTextFieldif you don't want to cap the column size. - Validate at registration time of the notification handler that the function name is short enough to fit in the database.
I think the first option is a better option, as writing the name as Python source code will naturally limit it to reasonable lengths, at which using a TextField will have essentially the same performance.