From 7a0228bed1cbd9bd323f84074873bbc8cf6ec481 Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Thu, 5 May 2022 13:23:49 +0100 Subject: [PATCH] un-verify in buildings table too --- app/src/api/dataAccess/verify.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/src/api/dataAccess/verify.ts b/app/src/api/dataAccess/verify.ts index 154a3cc8..8bcb3153 100644 --- a/app/src/api/dataAccess/verify.ts +++ b/app/src/api/dataAccess/verify.ts @@ -106,6 +106,15 @@ export async function removeBuildingUserVerifiedAttribute(buildingId: number, us `, [buildingId, userId, attribute] ); + if (attribute == 'current_landuse_group'){ + await (db).none( + `UPDATE buildings + SET current_landuse_verified = FALSE + WHERE buildings.building_id = $1;" + `, + [buildingId] + ); + } } catch(error) { throw new DatabaseError(error.detail); }