Procházet zdrojové kódy

修正get_performance_data bug

James Iter před 9 roky
rodič
revize
6494f26d29
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      api/performance.py

+ 1 - 1
api/performance.py

@@ -130,7 +130,7 @@ def get_performance_data(uuid, uuid_field, the_class=None, granularity='hour'):
         if granularity == 'day':
         if granularity == 'day':
             ret['data'] = smooth_data(boundary=_boundary, interval=600, now_ts=ts, rows=_rows)
             ret['data'] = smooth_data(boundary=_boundary, interval=600, now_ts=ts, rows=_rows)
 
 
-        if granularity == 'seven_days':
+        elif granularity == 'seven_days':
             ret['data'] = smooth_data(boundary=_boundary, interval=600, now_ts=ts, rows=_rows)
             ret['data'] = smooth_data(boundary=_boundary, interval=600, now_ts=ts, rows=_rows)
 
 
         else:
         else: