add debug to the DependentPackagesJob

This commit is contained in:
Alexander Machehin 2015-05-15 17:53:36 +05:00
parent bd16d08df8
commit c8fa5eea69
1 changed files with 10 additions and 1 deletions

View File

@ -47,7 +47,16 @@ module BuildLists
use_extra_tests use_extra_tests
).each { |field| bl.send("#{field}=", options[field]) } ).each { |field| bl.send("#{field}=", options[field]) }
BuildListPolicy.new(user, bl).create? && bl.save # debug
if BuildListPolicy.new(user, bl).create?
begin
bl.save!
rescue ActiveRecord::RecordInvalid => invalid
raise 'bl.save! ' + invalid.record.errors
end
else
raise 'BuildListPolicy.new(user, bl).create? is false!'
end
end end
end end
end end