monzo / response

Monzo's real-time incident response and reporting tool ⚡️
MIT License
1.53k stars 165 forks source link

Possible to set a channel name that's too long #164

Open danpalmer opened 5 years ago

danpalmer commented 5 years ago

I believe it's currently possible to set a channel name with rename that is too long to fit in the database table.

Recommendations of fixes:

  1. Convert to TextField, on Postgres at least there's essentially no performance benefit of using a CharField with a cap over a TextField if you don't want to cap the column size.
  2. Save to the database before making the Slack API calls. This way if the database save fails, Slack isn't modified, but if the API calls fail the database changes will roll back anyway.