Closed bjendres closed 4 years ago
Relevant core issue: https://lab.civicrm.org/dev/core/issues/675 - no fix, unfortunately, since APIv3 is frozen.
We worked around this with a core patch to avoid whack-a-mole in all extensions (though of course a fix within the extension would be cleaner):
diff --git a/api/v3/EntityTag.php b/api/v3/EntityTag.php
index 39a6f8ace4..4512503510 100644
--- a/api/v3/EntityTag.php
+++ b/api/v3/EntityTag.php
@@ -155,10 +155,6 @@ function _civicrm_api3_entity_tag_common($params, $op = 'add') {
$values['not_removed'] += $nr;
}
}
- if (empty($values['added']) && empty($values['removed'])) {
- $values['is_error'] = 1;
- $values['error_message'] = "Unable to $op tags";
- }
return $values;
}
released with 1.6
Released with 1.7
Adding a tag that's already there seems to produce an API Exception