diff --git a/pagure/lib/__init__.py b/pagure/lib/__init__.py index 5af833a..3898524 100644 --- a/pagure/lib/__init__.py +++ b/pagure/lib/__init__.py @@ -1640,7 +1640,7 @@ def update_user_ssh(session, user, ssh_key): message = 'Nothing to update' - ssh_key = ssh_key.strip().replace('\n', '') if ssh_key.strip() else None + ssh_key = ssh_key.strip().replace('\n', '') if ssh_key and ssh_key.strip() else None if ssh_key != user.public_ssh_key: user.public_ssh_key = ssh_key