Skip to content

Commit

Permalink
Merge pull request #876 from instedd/fix/finish-calls-with-contacts
Browse files Browse the repository at this point in the history
Fix: Contact's don't have `finished_at` but `last_activity_at`
  • Loading branch information
matiasgarciaisaia authored Jul 3, 2020
2 parents 178b27c + 44dccad commit e6086e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/call_log.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def finish(state)
self.finished_at = Time.now.utc
self.save!

self.contact.update_column(:last_activity_at, self.finished_at) if self.contact && self.finished_at > self.contact.finished_at
self.contact.update_column(:last_activity_at, self.finished_at) if self.contact && (self.contact.last_activity_at.nil? || self.finished_at > self.contact.last_activity_at)

begin
call_flow.try(:push_results, self) if call_flow && call_flow.store_in_fusion_tables
Expand Down

0 comments on commit e6086e2

Please # to comment.