From 121f8329fbe55130479d739f14051ee7cb88692c Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Fri, 29 Sep 2017 14:32:35 -0700 Subject: [PATCH] improve normalize_authors text --- etiquette/searchhelpers.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/etiquette/searchhelpers.py b/etiquette/searchhelpers.py index bd84f72..93edcd2 100644 --- a/etiquette/searchhelpers.py +++ b/etiquette/searchhelpers.py @@ -176,8 +176,10 @@ def normalize_authors(authors, photodb, warning_bag=None): ''' Either: - A string, where the usernames are separated by commas - - An iterable containing usernames - - An iterable containing User objects. + - An iterable containing + - Usernames + - User IDs + - User objects Returns: A set of user IDs. ''' @@ -196,7 +198,7 @@ def normalize_authors(authors, photodb, warning_bag=None): requested_author = requested_author.username try: - user = get_user(photodb, requested_author) + user = get_user(photodb, username_or_id=requested_author) except exceptions.NoSuchUser as e: if warning_bag: warning_bag.add(e.error_message)