Commit 571c1f7d authored by drumm's avatar drumm
Browse files

Issue #3104698: Shorter check for “recommended API terms,” remove tid that is not saved

parent 15d2730b
......@@ -37,10 +37,8 @@ function project_release_project_edit_form($form, $form_state, $node) {
// supported.
if ($versions = project_release_get_releases_by_version($node->nid, $object->branch)) {
$current_versions[$object->branch] = entity_metadata_wrapper('node', array_shift($versions));
if (isset($api_field)) {
if (!empty($current_versions[$object->branch]->{$api_field}->value()->tid) && !isset($recommended_api_terms['taxonomy_term'][$current_versions[$object->branch]->{$api_field}->value()->tid])) {
continue;
}
if (isset($api_field) && ($api_tid = project_release_get_release_api_tid($current_versions[$object->branch]->raw())) && !isset($recommended_api_terms['taxonomy_term'][$api_tid])) {
continue;
}
}
......
......@@ -360,7 +360,6 @@ function project_release_check_supported_versions(stdClass $release, $regen = TR
else {
// Adding or editing a release.
$fields = [
'tid' => project_release_get_release_api_tid($release) ?: 0,
'recommended_release' => $stable_release,
'latest_release' => $latest_release,
'latest_security_release' => $latest_security_release,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment