Skip to content

Commit 10fa832

Browse files
committed
fix: avoid lower casing none
1 parent 146ca33 commit 10fa832

File tree

1 file changed

+1
-1
lines changed
  • src/wordpress_markdown_blog_loader

1 file changed

+1
-1
lines changed

src/wordpress_markdown_blog_loader/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ def get_unique_user_by_name(self, name: str, email: Optional[str]) -> "User":
338338
if len(users) == 0:
339339
raise ValueError(f"author '{name}' not found on {self.endpoint.host}")
340340
elif len(users) > 1:
341-
user = next(filter(lambda u: email and u.email.lower() == email.lower(), users), None)
341+
user = next(filter(lambda u: email and u.email and u.email.lower() == email.lower(), users), None)
342342
if not user:
343343
raise ValueError(
344344
f"Multiple authors named '{name}' found, none with email {email} (possible: { {u.email for u in users} })."

0 commit comments

Comments
 (0)