From a1e83a19b0a0c85fb58f43565689a2814b91634c Mon Sep 17 00:00:00 2001 From: Heiniusw Date: Wed, 18 Sep 2024 10:53:23 +0200 Subject: [PATCH] lehrer default filter fix --- utils/getDefaultFilter.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/utils/getDefaultFilter.ts b/utils/getDefaultFilter.ts index 26c8da7..758e6ec 100644 --- a/utils/getDefaultFilter.ts +++ b/utils/getDefaultFilter.ts @@ -2,5 +2,6 @@ export const getDefaultFilter = (userInformation) => { if (!userInformation) return null; let type = userInformation.usertype == 'pupil' ? 'class' : 'teacher'; let value = userInformation.usertype == 'pupil' ? userInformation.classid : userInformation.id; - return { type: type, value: value, group: String(userInformation.group) }; + let group = userInformation.usertype == 'pupil' ? String(userInformation.group) : '1'; + return { type: type, value: value, group: group }; }; \ No newline at end of file