From bd36cd457d156afa868edbb3268e22d0b32601b1 Mon Sep 17 00:00:00 2001 From: Mark W <24956497+ndg63276@users.noreply.github.com> Date: Wed, 4 Oct 2023 12:04:47 +0100 Subject: [PATCH] LIMS-1029: Fix bug creating lab contact with login (#676) Co-authored-by: Mark Williams --- api/src/Page/Contact.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/Page/Contact.php b/api/src/Page/Contact.php index 10807e4c8..64d9e7ef9 100644 --- a/api/src/Page/Contact.php +++ b/api/src/Page/Contact.php @@ -167,7 +167,7 @@ function _add_contact() { foreach ($lfields as $i => $f) { if ($this->has_arg($f)) { $c = $f == 'LABNAME' ? 'NAME' : $f; - $this->db->pq('UPDATE laboratory SET '.$c.'=:1 WHERE laboratoryid=:2', array($this->arg($f), $lab['LABORATORYID'])); + $this->db->pq('UPDATE laboratory SET '.$c.'=:1 WHERE laboratoryid=:2', array($this->arg($f), $lab[0]['LABORATORYID'])); } } }