User should be a string/bytes when reindexing stories.

This commit is contained in:
Samuel Clay 2022-12-26 22:16:37 -05:00
parent 593b736c26
commit 2c96b83c36

View file

@ -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'])