API returns column default value formatted differently from submitted #3716
Labels
needs: requirements
The problem is clear and worth solving, but we're not yet sure of the best solution
regression
restricted: maintainers
Only maintainers can resolve this issue
type: bug
Something isn't working
work: backend
Related to Python, Django, and simple SQL
Milestone
Steps to reproduce
Use the front end to set a default value for a text column. In the value field, enter:
Observe that the default is set up as expected in PostgreSQL.
Expect the "Default Value" configuration form for the column to display a default value of
foo bar
, exactly as-entered.Instead, observe that the default value displayed in the form (as is returned from the API) is:
This bug presents usability problems for users wishing to modify an existing default value.
The default value can be modified, but it must first be extracted from within the text casting expression.
Considerations
I think a proper fix for this bug may require some re-thinking of the API return value schema when fetching columns. I'm not sure we'd be able to fix this while sticking to using a single string here.
The text was updated successfully, but these errors were encountered: