From 2545cdfc7f63d8856bd1db54370561b52961f351 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Mon, 23 Oct 2023 17:36:24 +0200 Subject: [PATCH] Fixed birthday gql output --- bot/src/bot_graphql/queries/user_query.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/src/bot_graphql/queries/user_query.py b/bot/src/bot_graphql/queries/user_query.py index ceeab6d4..a6cffa64 100644 --- a/bot/src/bot_graphql/queries/user_query.py +++ b/bot/src/bot_graphql/queries/user_query.py @@ -56,7 +56,7 @@ class UserQuery(DataQueryWithHistoryABC): self.set_field("xp", self.resolve_xp) self.set_field("messageCount", lambda x, *_: x.message_count) self.set_field("reactionCount", lambda x, *_: x.reaction_count) - self.set_field("birthday", lambda x, *_: x.birthday) + self.set_field("birthday", lambda x, *_: None if x.birthday is None else x.birthday.strftime("%d.%m.%Y")) self.set_field("ontime", self.resolve_ontime) self.set_field("level", self.resolve_level) self.add_collection(