[Demo] Fix error when viewing newly created deals in CRM demo #9733
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
In the CRM demo, there is an error on viewing a newly created deal.:
When you create a new deal. You didn't set se
start_at
value.On the show page, we try to format this date.
When there is any value in the
start_at
column, we have an error.Solution 1
Format conditionally this value
Solution 2
Add a
start_at
input tn the create formChosen solution : 2