Skip to content

Commit

Permalink
Fix #334, skip validation if media_path is nil
Browse files Browse the repository at this point in the history
  • Loading branch information
aidewoode committed Jan 3, 2024
1 parent 81019e0 commit 2819d14
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/models/setting.rb
Expand Up @@ -20,6 +20,8 @@ class Setting < ApplicationRecord
private

def media_path_exist
return if media_path.nil?

errors.add(:media_path, :blank) and return if media_path.blank?

path = File.expand_path(media_path)
Expand Down

0 comments on commit 2819d14

Please sign in to comment.