fix error handling old logs #261

This commit is contained in:
Leo Germani 2019-09-17 20:04:05 -03:00
parent 418f08d563
commit 72a2737d36
1 changed files with 1 additions and 1 deletions

View File

@ -112,7 +112,7 @@ class REST_Logs_Controller extends REST_Controller {
if(!empty($item)){
// Hanle logs created before 1.0
if ($item->get_log_diffs() && $item->get_value()) {
if ( !empty( get_post_meta($item->get_id(), 'value', true) ) && !empty( get_post_meta($item->get_id(), 'log_diffs', true) ) ) {
return $this->prepare_legacy_item_for_response($item, $request);
}