CreateChartCommand/UpdateChartCommand.validate() only reads
datasource.name; SavedQuery still crashed one step later for
non-admin callers (SecurityManager.raise_for_access needs .perm and
.data) and for every caller at flush time (Slice's
before_insert/before_update listener copies .perm/.catalog_perm/
.schema_perm onto the chart unconditionally). Add those properties
plus a None-safe fallback for name/perm when label is unset, and
test the real (unmocked) raise_for_access and set_related_perm paths
so a saved_query chart can actually be created end to end.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>