Procházet zdrojové kódy

Fixed calibration getting flow

Gamaliel Espinoza Macedo před 6 roky
rodič
revize
579d1d38aa
1 změnil soubory, kde provedl 8 přidání a 8 odebrání
  1. 8 8
      ondemand/calibration.py

+ 8 - 8
ondemand/calibration.py

@@ -34,7 +34,14 @@ class Calibrations(object):
                 'fallTolerance': self.FALL_TOLERANCE,
             }
 
-        elif remote and not local:
+        elif not remote and local:
+            calibration = {
+                'tolerance': self.TOLERANCE_RATE,
+                'threshold': self.THRESHOLD,
+                'fallTolerance': self.FALL_TOLERANCE,
+            }
+
+        else:
             calibration = {
                 'tolerance': remote.get(
                     'tolerance',
@@ -50,13 +57,6 @@ class Calibrations(object):
                 )
             }
 
-        elif not remote and local:
-            calibration = {
-                'tolerance': self.TOLERANCE_RATE,
-                'threshold': self.THRESHOLD,
-                'fallTolerance': self.FALL_TOLERANCE,
-            }
-
         self.items[station] = calibration
 
         return self.items[station]