fix journal noop? check

pull/8173/head
ulferts 5 years ago
parent 022311cd0c
commit 0acff96c09
No known key found for this signature in database
GPG Key ID: A205708DE1284017
  1. 7
      app/models/journal/aggregated_journal.rb

@ -346,7 +346,6 @@ class Journal::AggregatedJournal
:project,
:data,
:data=,
:noop?,
to: :journal
# Initializes a new AggregatedJournal. Allows to explicitly set a predecessor, if it is already
@ -422,6 +421,12 @@ class Journal::AggregatedJournal
predecessor.nil?
end
# If we where to delegate here, the wrapped journal would be compared to its predecessor which is
# not necessarily the this aggreated journal's predecessor.
def noop?
(!notes || notes&.empty?) && get_changes.empty?
end
private
attr_reader :journal

Loading…
Cancel
Save