[forms] Fix handling of NULLs for chart or dashboard name #7078
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 PR resolves a couple of issues related to either a chart or dashboard name being
None
. Prior to #5445 these fields were encoded as empty strings and thus certain issues didn't surface.Since #5445 it is impossible to filter by either dashboard or chart in which the name (title) is undefined as there is no mechanism to filter either in/out
NULL
values. Furthermore sorting by either chart of dashboard name isn't viable due to an issue with Flask-AppBuilder as mentioned in #3673. On the flip side when empty strings were allowed it was possible to filter these entities however itwas not possible to navigate to said entity from the CRUD view as there was no link present.This PR additionally renames undefined names to
<empty>
in the CRUD view as this is consistent with both the Dashboard and Explorer views.Charts
Dashboards
to: @graceguo-supercat @michellethomas @mistercrunch @xtinec