Do not cause a fatal error if no contact_id field for a note is fille… #13910
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.
…d in when viewing contact notes
Overview
Through direct SQL and DAO level statements it is possible to create a note without having the contact_id field filled in, this section of the code assumes that when you are viewing a contact the contact_id field of all the notes rendered will be there when that isn't necessarily the case in the DB, this just stops a fatal error.
Before
Fatal error generated when trying to view the contacts' notes tab if any notes don't have a contact_id set
After
no fatal error
ping @eileenmcnaughton