Skip to content
Snippets Groups Projects
Commit 634866dd authored by Matt Tuchfarber's avatar Matt Tuchfarber
Browse files

Don't count a non-existing forums user as a failure

parent 5a164df3
No related branches found
No related tags found
No related merge requests found
......@@ -658,12 +658,20 @@ class ReplaceUsernamesView(APIView):
)
return True
except comment_client.CommentClientRequestError as exc:
log.exception(
u"Unable to change username from %s to %s in forums because forums API call failed with: %s.",
current_username,
new_username,
exc,
)
if exc.status_code == 404:
log.info(
u"Unable to change username from %s to %s in forums because user doesn't exist in forums",
current_username,
new_username,
)
return True
else:
log.exception(
u"Unable to change username from %s to %s in forums because forums API call failed with: %s.",
current_username,
new_username,
exc,
)
return False
log.info(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment