diff options
author | Stan Hu <stanhu@gmail.com> | 2018-08-02 11:17:00 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2018-08-02 11:18:31 -0700 |
commit | 1436423a490fe9f4c1ee1ccb8ecaa6240eed2906 (patch) | |
tree | 96aeebc6a85639996b106282663de41c41a7966f /app/services/users | |
parent | 93c7b6c51a49a1939a876f2510a69e59827ac816 (diff) | |
download | gitlab-ce-1436423a490fe9f4c1ee1ccb8ecaa6240eed2906.tar.gz |
Fix failing 500 errors when deploy tokens are used to clone
A DeployToken responds to `:username`, but it returns the username for the
token, not a User object. Don't attempt to log user activity in this case.
Closes gitlab-org/gitlab-ee#7080
Diffstat (limited to 'app/services/users')
-rw-r--r-- | app/services/users/activity_service.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/services/users/activity_service.rb b/app/services/users/activity_service.rb index 822df6c646a..db03ba8756f 100644 --- a/app/services/users/activity_service.rb +++ b/app/services/users/activity_service.rb @@ -11,6 +11,7 @@ module Users author.user end + @user = nil unless @user.is_a?(User) @activity = activity end |