Built motion from commit 70c527640.|1.0.24
[motion.git] / server / models / tools_interval.js
index 8addfa8..c040109 100644 (file)
@@ -50,6 +50,15 @@ module.exports = function(sequelize, DataTypes) {
           IntervalId: null
         }
       });
+
+      Interval.addScope('interval', function(IntervalId) {
+        return {
+          where: {
+            IntervalId: IntervalId
+          }
+        }
+      });
+
     }
   });