X-Git-Url: http://repos.xcallymotion.com/?a=blobdiff_plain;f=server%2Fmodels%2Ftools_trunk.js;h=f9df7ffa87283ed4534bd9151a135ebda7497269;hb=221ba7c2ffc043570bbad1e8f0d6074fb4ff1fb0;hp=ca991ec17d990f089972f6b665b19bef8d761bc9;hpb=5d92478b1cb7479f39a43973775a6f6147fba8ac;p=motion.git diff --git a/server/models/tools_trunk.js b/server/models/tools_trunk.js index ca991ec..f9df7ff 100644 --- a/server/models/tools_trunk.js +++ b/server/models/tools_trunk.js @@ -1,8 +1,6 @@ 'use strict'; -var crypto = require('crypto'); -var md5 = require('md5'); -var _ = require('lodash'); + module.exports = function(sequelize, DataTypes) { var Trunk = sequelize.define('Trunk', { @@ -467,11 +465,5 @@ module.exports = function(sequelize, DataTypes) { tableName: 'tools_trunks' }); - Trunk.beforeUpdate(function(doc) { - if (doc.changed('name')) { - throw new Error("You can't modify a trunk name"); - } - }); - return Trunk; }