Don't put invalid post categories into database
When creating a form there is now a post category question, although it's only compulsory for visitor forms. However even if it is not filled because the question has a default value representing "no data" we ended up storing that value in the database, and the default value is an invalid post category for our database schema. This didn't seem to do any real harm (Hotwire simply displayed a blank) but was at best confusing when examining the underlying column data. This change checks for the default "no data" value and sets the database column null in that case instead.
Loading
Please register or sign in to comment