lib/docman/commands/command.rb in docman-0.0.53 vs lib/docman/commands/command.rb in docman-0.0.54

- old
+ new

@@ -46,10 +46,10 @@ add_actions(self, @context) add_actions(@context, @context) if @context end def add_actions(obj, context = nil) - if obj.has_key? 'hooks' and obj['hooks'].has_key? @type + if obj.has_key? 'hooks' and obj['hooks'].has_key? @type and obj['hooks'][@type] obj['hooks'][@type].each_pair do |name, hooks| hooks = Marshal::load(Marshal.dump(hooks)) unless context.nil? hooks.each do |hook| hook['context'] = context \ No newline at end of file