From 87687cb3309ebd396b85ecb4f085839ff16a774b Mon Sep 17 00:00:00 2001 From: Alexander Date: Thu, 2 Jan 2025 15:14:55 +0100 Subject: [PATCH] Return found user not just the first entry of the list. --- src/wordpress_markdown_blog_loader/api.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/wordpress_markdown_blog_loader/api.py b/src/wordpress_markdown_blog_loader/api.py index 74863d8..20686ee 100644 --- a/src/wordpress_markdown_blog_loader/api.py +++ b/src/wordpress_markdown_blog_loader/api.py @@ -343,6 +343,7 @@ def get_unique_user_by_name(self, name: str, email: Optional[str]) -> "User": raise ValueError( f"Multiple authors named '{name}' found, none with email {email} (possible: { {u.email for u in users} })." ) + return user return users[0] def posts(self, query: dict = None) -> Iterator["Post"]: