Browse Source

discard unnecessary loop

Jens Keim 6 years ago
parent
commit
80f16d3b6c
1 changed files with 5 additions and 1 deletions
  1. 5 1
      code/Core/Statistics.py

+ 5 - 1
code/Core/Statistics.py

@@ -1262,13 +1262,17 @@ class Statistics:
             plt.gcf().clear()
             plt.gcf().clear()
 
 
             # retrieve data
             # retrieve data
-            degree = self.get_filtered_degree(degree_type + "Degree")
+
+            degree = self.stats_db.process_user_defined_query(
+                "SELECT ipAddress, %s FROM ip_degrees" % (degree_type + "Degree"))
 
 
             if degree is None:
             if degree is None:
                 return None
                 return None
 
 
             graphx, graphy = [], []
             graphx, graphy = [], []
             for entry in degree:
             for entry in degree:
+                if entry[1] <= 0:
+                    continue
                 # degree values
                 # degree values
                 graphx.append(entry[1])
                 graphx.append(entry[1])
                 # IP labels
                 # IP labels