Skip to content

Commit

Permalink
Return found user not just the first entry of the list.
Browse files Browse the repository at this point in the history
  • Loading branch information
abij authored Jan 2, 2025
1 parent 8276fd8 commit 87687cb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/wordpress_markdown_blog_loader/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]:
Expand Down

0 comments on commit 87687cb

Please sign in to comment.