view · edit · sidebar · attach · print · history

20120717-debug-swissmedic-plugin

<< | Index | >>


Summary

  • Fixed swissmedic Plugin
    • updated creation of new Package and new Package#part
    • deleted corrupted data via bin/admin
  • Found encondig problem in fachinfo pdf uploading.
  • Debug update_bsv

Commits

Index


Debug swissmedic plugin

in src/mode/package.rb

    def create_part
      part = Part.new
      part.package = self
      @parts ||= []
      @parts.push part
      part
    end
commit

Corrupted data

Plugin: ODDB::SwissmedicPlugin
Error: NoMethodError
Message: undefined method `each' for #<ODDB::Migel::Item:0x00000013923e80>
Backtrace:
/var/www/oddb.org/src/model/package.rb:416:in `checkout'
/var/www/oddb.org/src/util/persistence.rb:240:in `issue_delete'
/var/www/oddb.org/src/util/oddbapp.rb:115:in `block in delete'
/var/www/oddb.org/src/util/failsafe.rb:10:in `call'
/var/www/oddb.org/src/util/failsafe.rb:10:in `failsafe'
...

Package#feedbacks (src/model/feedback_observer.rb)

ch.oddb> packages.select{|pack| !pack.feedbacks.is_a? Array}.length
-> 6
ch.oddb> packages.select{|pack| !pack.feedbacks.is_a? Array}.first
-> #<ODDB::Package:0x00000019e4c140>
ch.oddb> packages.select{|pack| !pack.feedbacks.is_a? Array}.first.feedbacks
-> #<ODDB::Migel::Item:0x0000001003fbf0>
ch.oddb> 

Package#feedbacks in readonly.

And We can not use block in bin/admin.

ch.oddb> packages.select{ |pack| !pack.feedbacks.is_a? Array }.map{ |pack| pack.instance_eval { @feedbacks = [] } }.length
-> block not supplied

use odba_delete, directly.

ch.oddb> packages.select{ |pack| !pack.feedbacks.is_a? Array }.map{ |pack| pack.feedbacks.odba_delete }.length
-> 6
ch.oddb> packages.select{ |pack| !pack.feedbacks.is_a? Array }.first.feedbacks.class
NilClass

Debug fachinfo pdf upload

encoding error caused in pdf uploading.

in foreground fiparsed process
unknown encoding
unknown encoding
unknown encoding
unknown encoding
...
suspend

disallowed PDF format.

commit

Debug update_bsv job

view · edit · sidebar · attach · print · history
Page last modified on July 18, 2012, at 03:03 AM