From 2c96b83c3651469ea5e78ae8c8feca4309b59b68 Mon Sep 17 00:00:00 2001 From: Samuel Clay Date: Mon, 26 Dec 2022 22:16:37 -0500 Subject: [PATCH] User should be a string/bytes when reindexing stories. --- apps/search/management/commands/index_stories.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/search/management/commands/index_stories.py b/apps/search/management/commands/index_stories.py index da56b1770..d5dd4ee1f 100644 --- a/apps/search/management/commands/index_stories.py +++ b/apps/search/management/commands/index_stories.py @@ -20,7 +20,7 @@ class Command(BaseCommand): print("Missing user. Did you want to reindex everything? Use -R.") return - if re.match(r"([0-9]+)", options['user']): + if re.match(r"([0-9]+)", str(options['user'])): user = User.objects.get(pk=int(options['user'])) else: user = User.objects.get(username=options['user'])