From 74f12baac28c6262b4708653581eab5f1e9d3fc4 Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 31 Aug 2019 09:27:19 +0000 Subject: [PATCH] Follow up to #7582: Only update the contact when needed --- src/Model/Contact.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Model/Contact.php b/src/Model/Contact.php index b18ebc22d6..9d9ebe95f1 100644 --- a/src/Model/Contact.php +++ b/src/Model/Contact.php @@ -904,7 +904,7 @@ class Contact extends BaseObject public static function unmarkForArchival(array $contact) { // Always unarchive the relay contact entry - if (!empty($contact['batch'])) { + if (!empty($contact['batch']) && !empty($contact['term-date']) && ($contact['term-date'] > DBA::NULL_DATETIME)) { $fields = ['term-date' => DBA::NULL_DATETIME, 'archive' => false]; $condition = ['batch' => $contact['batch'], 'contact-type' => self::TYPE_RELAY]; DBA::update('contact', $fields, $condition);