Skip to content
Snippets Groups Projects
Unverified Commit 8d4d5423 authored by colemanw's avatar colemanw Committed by GitHub
Browse files

Merge pull request #20375 from JMAConsulting/core-65

Prevent adding duplicate dashlet if present with same name and label
parents e3aaef44 8f7fd744
No related branches found
No related tags found
No related merge requests found
......@@ -233,9 +233,8 @@ class CRM_Core_BAO_Dashboard extends CRM_Core_DAO_Dashboard {
$dashlet->domain_id = $params['domain_id'] ?? CRM_Core_Config::domainID();
// Try and find an existing dashlet - it will be updated if found.
if (!empty($params['name']) || !empty($params['url'])) {
if (!empty($params['name'])) {
$dashlet->name = $params['name'] ?? NULL;
$dashlet->url = $params['url'] ?? NULL;
$dashlet->find(TRUE);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment