Skip to content

Commit 87687cb

Browse files
authored
Return found user not just the first entry of the list.
1 parent 8276fd8 commit 87687cb

File tree

1 file changed

+1
-0
lines changed
  • src/wordpress_markdown_blog_loader

1 file changed

+1
-0
lines changed

src/wordpress_markdown_blog_loader/api.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,7 @@ def get_unique_user_by_name(self, name: str, email: Optional[str]) -> "User":
343343
raise ValueError(
344344
f"Multiple authors named '{name}' found, none with email {email} (possible: { {u.email for u in users} })."
345345
)
346+
return user
346347
return users[0]
347348

348349
def posts(self, query: dict = None) -> Iterator["Post"]:

0 commit comments

Comments
 (0)