Skip to content

Commit

Permalink
Fix if self.changeset is nil (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
jokius authored and chrisdpeters committed Dec 11, 2016
1 parent e2c8e49 commit 5ca7d67
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/draftsman/draft.rb
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ def reify
elsif self.previous_draft.present?
reify_previous_draft.reify
# Prefer changeset for refication if it's present.
elsif !self.changeset.empty?
elsif self.changeset.present? && self.changeset.any?
self.changeset.each do |key, value|
# Skip counter_cache columns
if self.item.respond_to?("#{key}=") && !key.end_with?('_count')
Expand Down

0 comments on commit 5ca7d67

Please sign in to comment.