Browse Source

Merge pull request #756 from visuddhinanda/wbw-analysis

relation 如果没有grammar 应该记录type
visuddhinanda 4 năm trước cách đây
mục cha
commit
e8eb3e5d0d

+ 2 - 0
app/Console/Commands/UpgradeWbwAnalyses.php

@@ -124,6 +124,8 @@ class UpgradeWbwAnalyses extends Command
                                             $grm = explode('$',$word->gramma);
                                             $grm = explode('$',$word->gramma);
                                             if(count($grm)>0){
                                             if(count($grm)>0){
                                                 $newData['d1'] = $grm[count($grm)-1];
                                                 $newData['d1'] = $grm[count($grm)-1];
+                                            }else{
+                                                $newData['d1'] = $word->type;
                                             }
                                             }
                                         }
                                         }
                                         $newData['d2'] = (int)(explode('-',$rltValue->dest_id)[2]) - (int)(explode('-',$rltValue->sour_id)[2]) ;
                                         $newData['d2'] = (int)(explode('-',$rltValue->dest_id)[2]) - (int)(explode('-',$rltValue->sour_id)[2]) ;