Browse Source

fix: data points

amanda 3 years ago
parent
commit
bca39bd8b8
1 changed files with 2 additions and 1 deletions
  1. 2 1
      backend_refactor/service/video_analyzer.py

+ 2 - 1
backend_refactor/service/video_analyzer.py

@@ -107,11 +107,12 @@ class BaseVideoAnalyzer:
             try:
             try:
                 for i in result['data']:
                 for i in result['data']:
                     result['data'][i]['file'] = FILE_URL + self.video_uuid + "." + result['data'][i]['index'] + ".jpg"
                     result['data'][i]['file'] = FILE_URL + self.video_uuid + "." + result['data'][i]['index'] + ".jpg"
+                result['data']['points']=self.points
             except Exception as e:
             except Exception as e:
                 logging.warning("file index in data not found, %s" % e)
                 logging.warning("file index in data not found, %s" % e)
 
 
             print(self.points)
             print(self.points)
-            callback("FINISHED", result={"result": result, "points": self.points})
+            callback("FINISHED", result=result)
         except Exception as e:
         except Exception as e:
             callback("ERROR", error=e)
             callback("ERROR", error=e)
             raise e
             raise e