Built motion from commit b33b832.|1.0.17
[motion.git] / server / models / square_project.js
index 6093d64..4179c7f 100644 (file)
@@ -7,7 +7,7 @@ module.exports = function(sequelize, DataTypes) {
   var SquareProject = sequelize.define('SquareProject', {
     name: {
       type: DataTypes.STRING,
-      unique: true,
+      unique: 'name',
       allowNull: false,
       validate: {
         notEmpty: true
@@ -19,16 +19,16 @@ module.exports = function(sequelize, DataTypes) {
       type: DataTypes.BLOB('long'),
       get: function() {
         if (this.getDataValue('preproduction')) {
-                                       return _.toString(this.getDataValue('preproduction'));
-                               }
+          return _.toString(this.getDataValue('preproduction'));
+        }
       }
     },
     production: {
       type: DataTypes.BLOB('long'),
       get: function() {
         if (this.getDataValue('production')) {
-                                       return _.toString(this.getDataValue('production'));
-                               }
+          return _.toString(this.getDataValue('production'));
+        }
       }
     }
   }, {