From 4d299cee1044fa22d226adbbc919cb2049f7c855 Mon Sep 17 00:00:00 2001 From: Finn Date: Wed, 23 Aug 2017 16:25:08 +0100 Subject: [PATCH] Fixed validation for organisation edit --- lib/Pear/LocalLoop/Controller/Api/User.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Pear/LocalLoop/Controller/Api/User.pm b/lib/Pear/LocalLoop/Controller/Api/User.pm index ef9ec89..c552933 100644 --- a/lib/Pear/LocalLoop/Controller/Api/User.pm +++ b/lib/Pear/LocalLoop/Controller/Api/User.pm @@ -124,7 +124,7 @@ sub post_account_update { if ( defined $user->customer_id ) { $validation->required('display_name'); $validation->required('full_name'); - } elsif ( defined $user->customer_id ) { + } elsif ( defined $user->organisation_id ) { $validation->required('name'); $validation->required('street_name'); $validation->required('town');