From d869bcfd3aa73297692d2da2253aaeecefc707c2 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Thu, 28 Sep 2023 19:51:02 +0200 Subject: [PATCH] Fixed mutation --- kdb-bot/src/bot_graphql/mutations/short_role_name_mutation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kdb-bot/src/bot_graphql/mutations/short_role_name_mutation.py b/kdb-bot/src/bot_graphql/mutations/short_role_name_mutation.py index cc996e18..3044af99 100644 --- a/kdb-bot/src/bot_graphql/mutations/short_role_name_mutation.py +++ b/kdb-bot/src/bot_graphql/mutations/short_role_name_mutation.py @@ -42,7 +42,7 @@ class ShortRoleNameMutation(QueryABC): ) result = self._short_role_names.find_short_role_names_by_role_id(short_role_name.role_id) - if result is not None: + if result.count() > 0: raise ValueError("Short name for role already exists") self._short_role_names.add_short_role_name(short_role_name)