Skip to content

Commit

Permalink
Merge pull request #690 from ChicagoWorldcon/plan-748-diff-fixes
Browse files Browse the repository at this point in the history
plan-748 fixes for add/drop changes (2.0.2)
  • Loading branch information
balen authored Aug 22, 2022
2 parents 620c93b + a169e8f commit d430f9f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions app/controllers/reports/schedule_reports_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,8 @@ def session_removed_row(sheet, change)
end

def session_time_change_row(sheet, change)
return unless change[:recent]

orig_time = Time.parse(change[:changes]['start_time'][0]) if change[:changes]['start_time'][0]
new_time = Time.parse(change[:changes]['start_time'][1]) if change[:changes]['start_time'][1]
# Rails.logger.debug "********* #{change[:changes]['start_time'][1]} => #{new_time.class} #{new_time.strftime("%H")}"
Expand Down
2 changes: 1 addition & 1 deletion app/services/change_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def self.combined_changes(item_audits:, type:, to:)
# Get the old version of the object
obj = if audit.event == 'create'
# reify next just incase is has subsequently been deleted in a later pub and the find/exist will be nil
res = audit.next.reify
res = audit.next ? audit.next.reify : nil
res ||= type.find(audit.item_id) if type.exists?(audit.item_id)
res
else
Expand Down

0 comments on commit d430f9f

Please sign in to comment.