#557 NoMethodError: undefined method '[]' for nil:NilClass
This commit is contained in:
parent
f6d696cf0e
commit
7f8a27d1d7
@ -87,11 +87,11 @@ class DmsfFile < ActiveRecord::Base
|
|||||||
end
|
end
|
||||||
|
|
||||||
def initialize(*args)
|
def initialize(*args)
|
||||||
|
super
|
||||||
@project = nil
|
@project = nil
|
||||||
if new_record?
|
if new_record?
|
||||||
self.watcher_user_ids = []
|
self.watcher_user_ids = []
|
||||||
end
|
end
|
||||||
super
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.storage_path
|
def self.storage_path
|
||||||
|
|||||||
@ -122,10 +122,10 @@ class DmsfFolder < ActiveRecord::Base
|
|||||||
end
|
end
|
||||||
|
|
||||||
def initialize(*args)
|
def initialize(*args)
|
||||||
|
super
|
||||||
if new_record?
|
if new_record?
|
||||||
self.watcher_user_ids = []
|
self.watcher_user_ids = []
|
||||||
end
|
end
|
||||||
super
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def default_values
|
def default_values
|
||||||
|
|||||||
@ -30,8 +30,10 @@ module RedmineDmsf
|
|||||||
# Overridden methods
|
# Overridden methods
|
||||||
|
|
||||||
def initialize(attributes=nil, *args)
|
def initialize(attributes=nil, *args)
|
||||||
self.watcher_user_ids = []
|
|
||||||
super
|
super
|
||||||
|
if new_record?
|
||||||
|
self.watcher_user_ids = []
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def copy(project, options={})
|
def copy(project, options={})
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user