From 96df75e1cb6309bbcd9eddbe89e31e88f019f364 Mon Sep 17 00:00:00 2001
From: Ed Chalstrey <edwardchalstrey@gmail.com>
Date: Fri, 24 Jun 2022 14:25:43 +0100
Subject: [PATCH] handle unusual case of Team having a non ccategory field

---
 app/src/frontend/building/data-container.tsx | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/app/src/frontend/building/data-container.tsx b/app/src/frontend/building/data-container.tsx
index dbe0abad..db45a770 100644
--- a/app/src/frontend/building/data-container.tsx
+++ b/app/src/frontend/building/data-container.tsx
@@ -89,6 +89,9 @@ const withCopyEdit: (wc: React.ComponentType<CategoryViewProps>) => DataContaine
                 if (dataFields[key].category == props.cat && fieldName != null){
                     categoryKeys[key] = true;
                 }
+                if (props.cat == 'team' && key == 'date_year' fieldName != null){
+                    categoryKeys[key] = true;
+                }
             }
             if(newBuildingId !== state.currentBuildingId || newBuildingRevisionId > state.currentBuildingRevisionId) {
                 return {