Git Product home page Git Product logo

Comments (5)

rushsteve1 avatar rushsteve1 commented on June 25, 2024

This is the location of the bug:

  21: observatory::users::handlers::user_commits_count
             at src/users/handlers.rs:229

user_projects(conn, &user)
.iter()
.map(|p| project_commits(conn, p).unwrap())
.flatten()
.collect::<Vec<serde_json::Value>>()
.first()?
.as_array()?
.iter()
.filter(|c| {
c.get("author")
.unwrap()
.get("login")
.unwrap()
.as_str()
.unwrap()
== user.handle
})
.count(),

Somewhere in that very long statement one of the unwrap()s is failing.
This might be due to a user not having any repos associated with them, or possibly no commits?
Replacing the unwrap()s with expect()s with error messages should make this more apparent.

from observatory-new.

4very avatar 4very commented on June 25, 2024

Could not replicate this issue after deleting my database file, even after creating an account with the same information. This probably was on my end.

from observatory-new.

rushsteve1 avatar rushsteve1 commented on June 25, 2024

I was able to replicate it and I think @OliviaLundelius did too.
I believe it only happens when the associated GitHub account has NO repos and NO commits but I am not quite sure.

from observatory-new.

4very avatar 4very commented on June 25, 2024

Credentials that I originally used were as follows:
email - [email protected]
password - a
real name - Admin
github - admina

from observatory-new.

rushsteve1 avatar rushsteve1 commented on June 25, 2024

None of us have been able to replicate this for quite a while so I think the bug is gone. Going to close this issue. If it comes back up then I'll re-open.

from observatory-new.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.