Errors fixing
This commit is contained in:
parent
2c090bcf77
commit
d8e33006f2
@ -117,7 +117,10 @@ class DmsfFilesCopyController < ApplicationController
|
||||
private
|
||||
|
||||
def log_activity(file, action)
|
||||
Rails.logger.info "#{Time.now.strftime('%Y-%m-%d %H:%M:%S')} #{User.current.login}@#{request.remote_ip}/#{request.env['HTTP_X_FORWARDED_FOR']}: #{action} dmsf://#{file.project.identifier}/#{file.id}/#{file.last_revision.id}"
|
||||
if file && file.last_revision
|
||||
Rails.logger.info
|
||||
"#{Time.now.strftime('%Y-%m-%d %H:%M:%S')} #{User.current.login}@#{request.remote_ip}/#{request.env['HTTP_X_FORWARDED_FOR']}: #{action} dmsf://#{file.project.identifier}/#{file.id}/#{file.last_revision.id}"
|
||||
end
|
||||
end
|
||||
|
||||
def find_file
|
||||
|
||||
@ -77,7 +77,7 @@ class DmsfLink < ActiveRecord::Base
|
||||
def target_file
|
||||
unless @target_file
|
||||
if self.target_file_id
|
||||
DmsfFile.find_by_id self.target_file_id
|
||||
@target_file = DmsfFile.find_by_id self.target_file_id
|
||||
end
|
||||
end
|
||||
@target_file
|
||||
@ -85,7 +85,7 @@ class DmsfLink < ActiveRecord::Base
|
||||
|
||||
def target_project
|
||||
unless @target_project
|
||||
Project.find_by_id self.target_project_id
|
||||
@target_project = Project.find_by_id self.target_project_id
|
||||
end
|
||||
@target_project
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user