aeolus-incubator / tim

Web application for managing virtual images to be deployed in the cloud
www.aeolusproject.org
MIT License
3 stars 6 forks source link

template validation raises an exception #55

Closed jprovaznik closed 11 years ago

jprovaznik commented 11 years ago

=> #<Tim::Template id: nil, xml: "asdf", created_at: nil, updated_at: nil, pool_family_id: nil> irb(main):002:0> tpl.valid? Nokogiri::XML::SyntaxError: Start tag expected, '<' not found from /home/jprovazn/devel/bundle-conductor/ruby/1.9.1/gems/nokogiri-1.5.5/lib/nokogiri/xml/document.rb:54:in read_memory' from /home/jprovazn/devel/bundle-conductor/ruby/1.9.1/gems/nokogiri-1.5.5/lib/nokogiri/xml/document.rb:54:inparse' from /home/jprovazn/devel/bundle-conductor/ruby/1.9.1/gems/nokogiri-1.5.5/lib/nokogiri/xml.rb:33:in XML' from /home/jprovazn/devel/tim/app/validators/template_validator.rb:8:invalidate' from /home/jprovazn/devel/bundle-conductor/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/callbacks.rb:310:in _callback_before_111' from /home/jprovazn/devel/bundle-conductor/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/callbacks.rb:407:in_run3289958361602655565validate1238967391509302401callbacks' from /home/jprovazn/devel/bundle-conductor/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/callbacks.rb:405:in __run_callback' from /home/jprovazn/devel/bundle-conductor/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/callbacks.rb:385:in_run_validate_callbacks' from /home/jprovazn/devel/bundle-conductor/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/callbacks.rb:81:in run_callbacks' from /home/jprovazn/devel/bundle-conductor/ruby/1.9.1/gems/activemodel-3.2.9/lib/active_model/validations.rb:228:inrun_validations!' from /home/jprovazn/devel/bundle-conductor/ruby/1.9.1/gems/activemodel-3.2.9/lib/active_model/validations/callbacks.rb:53:in block in run_validations!' from /home/jprovazn/devel/bundle-conductor/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/callbacks.rb:403:in_run3289958361602655565validation1238967391509302401callbacks' from /home/jprovazn/devel/bundle-conductor/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/callbacks.rb:405:in __run_callback' from /home/jprovazn/devel/bundle-conductor/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/callbacks.rb:385:in_run_validation_callbacks' from /home/jprovazn/devel/bundle-conductor/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/callbacks.rb:81:in run_callbacks' from /home/jprovazn/devel/bundle-conductor/ruby/1.9.1/gems/activemodel-3.2.9/lib/active_model/validations/callbacks.rb:53:inrun_validations!' from /home/jprovazn/devel/bundle-conductor/ruby/1.9.1/gems/activemodel-3.2.9/lib/active_model/validations.rb:195:in valid?' from /home/jprovazn/devel/bundle-conductor/ruby/1.9.1/gems/activerecord-3.2.9/lib/active_record/validations.rb:69:invalid?' from (irb):2 from /home/jprovazn/devel/bundle-conductor/ruby/1.9.1/gems/railties-3.2.9/lib/rails/commands/console.rb:47:in start' from /home/jprovazn/devel/bundle-conductor/ruby/1.9.1/gems/railties-3.2.9/lib/rails/commands/console.rb:8:instart' from /home/jprovazn/devel/bundle-conductor/ruby/1.9.1/gems/railties-3.2.9/lib/rails/commands.rb:41:in <top (required)>' from ./script/rails:6:inrequire' from ./script/rails:6:in `

'irb(main):003:0>

template.errors should be set instead

jguiditta commented 11 years ago

This is fixed by above pull request