crete symbolic link error #959

This commit is contained in:
Karel Pičman 2019-01-25 11:00:56 +01:00
parent 04c1a1a809
commit 12ff703584
2 changed files with 6 additions and 2 deletions

View File

@ -112,7 +112,9 @@ class DmsfLinksController < ApplicationController
if result
flash[:notice] = l(:notice_successful_create)
else
flash[:errors] = @dmsf_link.errors.full_messages.to_sentence
msg = @dmsf_link.errors.full_messages.to_sentence
flash[:errors] = msg
Rails.logger.error msg
end
else
# Link to

View File

@ -28,7 +28,9 @@ class DmsfLink < ActiveRecord::Base
belongs_to :user
validates :name, presence: true, length: { maximum: 255 }
validates :project, presence: true
# There can be project_id = -1 when attaching links to an issue. The project_id is assigned later when saving the
# issue.
#validates :project, presence: true
validates :external_url, length: { maximum: 255 }
validates :external_url, dmsf_url: true