You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2021/10/28 00:51:49 UTC

[GitHub] [superset] lyndsiWilliams commented on a change in pull request #17223: fix(reports): Owners no longer showing undefined in reports

lyndsiWilliams commented on a change in pull request #17223:
URL: https://github.com/apache/superset/pull/17223#discussion_r737944161



##########
File path: superset-frontend/src/views/CRUD/alert/AlertReportModal.tsx
##########
@@ -517,7 +517,7 @@ const AlertReportModal: FunctionComponent<AlertReportModalProps> = ({
         contentType === 'dashboard' ? currentAlert?.dashboard?.value : null,
       database: currentAlert?.database?.value,
       owners: (currentAlert?.owners || []).map(
-        owner => (owner as MetaObject).value,
+        owner => (owner as MetaObject).value || owner.id,

Review comment:
       `owners.label` is `first_name` + `last_name`, `owner.value` is the id of the owner. This is where the PUT turns owners into a list of ids for the backend. ([See here where owners is set in currentAlert](https://github.com/apache/superset/blob/67fd0c21c6a4e3f005881ba9baa132b66f0fb7d1/superset-frontend/src/views/CRUD/alert/AlertReportModal.tsx#L968))




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org