Revision aaaf78f2 snf-cyclades-app/synnefo/userdata/views.py

b/snf-cyclades-app/synnefo/userdata/views.py
77 77
    if not SUPPORT_GENERATE_KEYS:
78 78
        raise Exception("Application does not support ssh keys generation")
79 79

  
80
    if PublicKeyPair.user_limit_exceeded(request.user):
81
        raise http.HttpResponseServerError("SSH keys limit exceeded")
80
    if PublicKeyPair.user_limit_exceeded(request.user_uniq):
81
        return http.HttpResponseServerError("SSH keys limit exceeded")
82 82

  
83 83
    # generate RSA key
84 84
    from Crypto import Random

Also available in: Unified diff