Disable validation for IMPORTED jobs - warvox - VoIP based wardialing tool, forked from rapid7/warvox.
DIR Log
DIR Files
DIR Refs
DIR README
---
DIR commit 4b18dfc7da016c99850de43091f18b8d7751c254
DIR parent fa274655412515187110cee09e8e04c9b70571df
HTML Author: HD Moore <hd_moore@rapid7.com>
Date: Fri, 28 Dec 2012 14:23:31 -0600
Disable validation for IMPORTED jobs
Diffstat:
M app/models/dial_job.rb | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
DIR diff --git a/app/models/dial_job.rb b/app/models/dial_job.rb
@@ -11,7 +11,9 @@ class DialJob < ActiveRecord::Base
validate :validate_range
def validate_range
- if(range.gsub(/[^0-9X:,\n]/, '').empty?)
+ return if range == "IMPORTED"
+
+ if range.gsub(/[^0-9X:,\n]/, '').empty?
errors.add(:range, "must be at least 1 character long and made up of 0-9 and X as the mask.")
end