Return blank tiles from get_tile_data() #10829 #10834
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.
Types of changes
Description of Change
Return blank tiles (holding only None values) from
get_tile_data()
rather than returning an implicit None. For example, return{node_id: None}
rather thanNone
.Datatypes often drill into the result of
get_type_data()
expecting a dict, and do not check forNone
. (Perhaps they should, since there is still a code path that could return None after logging an exception. Or, we could elevate that logged exception to a runtime exception, but that's outside the scope here.)Tiles might hold only None if a tile is added for a resource and then edited to remove all values. Or they might have been created in a data migration (#9704, 7.5.0).
Refs 4b02d35
History
4b02d35 changed the if/else logic so that tiles with only falsy values log an exception and return None implicitly (7.5.0)
e4a519e tightened that up to "only None values" to exempt falsy values like [] in the file-list datatype. (7.5.0)
be7a130 removed the logged exception for blank tiles but kept the implicit None return (7.5.2)
Targeting dev/7.5.x as this is a regression in 7.5.0.
Issues Solved
Closes #10829
Checklist
Ticket Background