Simplify the way "edit list" title is determined. #2418
Merged
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.
This addresses a problem discovered while testing #2417: in PostgreSQL, new rows fetched from the database come with the ID pre-populated from the sequence, even if they are never saved. This interferes with correctly differentiating between "create row" and "edit row" titles. Fortunately, an existing flag offers an easier way to do this correctly.
Note that the underlying cause of the problem may still be a problem, since hitting "create list" repeatedly exhausts IDs unnecessarily. However, I'm not going to worry too much about that right now, since I'm hopeful that switching everything to Doctrine will likely change the situation anyway (see #2233).
TODO