diff --git a/app/models/entity_with_issues.rb b/app/models/entity_with_issues.rb index 25841a0e7..9a9ea23a5 100644 --- a/app/models/entity_with_issues.rb +++ b/app/models/entity_with_issues.rb @@ -22,7 +22,7 @@ class EntityWithIssues < ActiveRecord::Base validate :entity_attribute_exists? def entity_attribute_exists? - unless entity.attributes.include?(entity_attribute) || entity_attribute.empty? + unless entity.attributes.include?(entity_attribute) || entity_attribute.nil? errors.add(:entity_attribute, "#{entity_attribute} does not exist") end end