#557 NoMethodError: undefined method '[]' for nil:NilClass

This commit is contained in:
Karel.Picman 2022-02-09 12:53:55 +01:00
parent f6d696cf0e
commit 7f8a27d1d7
3 changed files with 5 additions and 3 deletions

View File

@ -87,11 +87,11 @@ class DmsfFile < ActiveRecord::Base
end
def initialize(*args)
super
@project = nil
if new_record?
self.watcher_user_ids = []
end
super
end
def self.storage_path

View File

@ -122,10 +122,10 @@ class DmsfFolder < ActiveRecord::Base
end
def initialize(*args)
super
if new_record?
self.watcher_user_ids = []
end
super
end
def default_values

View File

@ -30,8 +30,10 @@ module RedmineDmsf
# Overridden methods
def initialize(attributes=nil, *args)
self.watcher_user_ids = []
super
if new_record?
self.watcher_user_ids = []
end
end
def copy(project, options={})