Browse Source

fix update report

chenxz 8 năm trước cách đây
mục cha
commit
9548433def

+ 6 - 4
mooctest-site-server/src/main/java/cn/iselab/mooctest/site/web/logic/impl/ReportLogicImpl.java

@@ -179,15 +179,17 @@ public class ReportLogicImpl implements ReportLogic {
 
     private Report updateReportInfo(Report report, ReportVO reportVO) {
 
-        report.setBugAmount(reportVO.getBugAmount());
         report.setDeviceBrand(reportVO.getDeviceBrand());
         report.setDeviceModel(reportVO.getDeviceModel());
         report.setDeviceOs(reportVO.getDeviceOs());
         report.setFromCloud(reportVO.getFromCloud());
-        report.setLogLocation(reportVO.getLogLocation());
+        if(reportVO.getLogLocation()!=null)
+            report.setLogLocation(reportVO.getLogLocation());
         report.setName(reportVO.getName());
-        report.setReportLocation(reportVO.getReportLocation());
-        report.setScriptLocation(reportVO.getScriptLocation());
+        if(reportVO.getReportLocation()!=null)
+            report.setReportLocation(reportVO.getReportLocation());
+        if(reportVO.getScriptLocation()!=null)
+            report.setScriptLocation(reportVO.getScriptLocation());
         if(reportVO.getReportCases()!=null) {
             JSONArray jsonArray = new JSONArray(reportVO.getReportCases());
             report.setDescription(jsonArray.toString());