function cleanAlert(alert) {
  alert = {
    ...alert,
    card: _.pick(alert.card, "id", "include_csv", "include_xls"),
  };
  if (alert.collection_id == null) {
    delete alert.collection_id;
  }
  if (alert.alert_above_goal == null) {
    delete alert.alert_above_goal;
  }
  return alert;
}
// NOTE: backend is a little picky about the properties present on the alert
backend is a little picky about the properties present on the alert
backend is a little picky about the properties present on the alert
function cleanAlert(alert) {
  alert = {
    ...alert,
    card: _.pick(alert.card, "id", "include_csv", "include_xls"),
  };
  if (alert.collection_id == null) {
    delete alert.collection_id;
  }
  if (alert.alert_above_goal == null) {
    delete alert.alert_above_goal;
  }
  return alert;
}
function cleanAlert ( alert ) { alert = { ... alert , card : _ . pick ( alert . card , "id" , "include_csv" , "include_xls" ) , } ; if ( alert . collection_id == null ) { delete alert . collection_id ; } if ( alert . alert_above_goal == null ) { delete alert . alert_above_goal ; } return alert ; }
NOTE: backend is a little picky about the properties present on the alert
NOTE : backend is a little picky about the properties present on the alert