Skip to content

Fixed error that happened to try get user information without user scope #911

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 6 commits into from

Conversation

mtb-beta
Copy link

@mtb-beta mtb-beta commented Dec 3, 2018

I created the fix for issue #797.
Review please.
Thank you.

@mtb-beta mtb-beta changed the title [WIP] Fixed error that happened to try get user information without user scope Fixed error that happened to try get user information without user scope Dec 3, 2018
@unformatt
Copy link

@sigmavirus24 Please merge this. Thank you @mtb-beta

Copy link
Contributor

@simahawk simahawk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got the issue, tried the patch: works like a charm. Thanks :)

self.owned_private_repos_count = user["owned_private_repos"]
self.total_private_repos_count = user["total_private_repos"]
self.plan = user.get("plan")
user_can_be_see = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you mean "seen"?

@samkumar
Copy link

Any updates as to when this might be merged? I'm on version 1.2.0 and I'm seeing this issue---would be great to have a fix soon.

@brechtm
Copy link

brechtm commented Apr 20, 2020

I was wondering whether this fix can be included in the next release if time permits, since this issue requires downgrading to 0.9.6 for some use cases. Thanks.

@simahawk
Copy link
Contributor

@sigmavirus24 any chance to see this merged?

Copy link
Collaborator

@omgjlk omgjlk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made some suggestions, but I think I messed up the merge comment I made earlier. Going to try sorting it out.

self.owned_private_repos_count = user["owned_private_repos"]
self.total_private_repos_count = user["total_private_repos"]
self.plan = user.get("plan")
user_can_be_see = {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
user_can_be_see = {
user_can_be_seen = {

"total_private_repos_count": None,
"plan": None,
}
user_can_be_see.update(user)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
user_can_be_see.update(user)
user_can_be_seen.update(user)

Comment on lines +895 to +902
self.disk_usage = user_can_be_see["disk_usage"]
self.owned_private_repos_count = user_can_be_see[
"owned_private_repos_count"
]
self.total_private_repos_count = user_can_be_see[
"total_private_repos_count"
]
self.plan = user_can_be_see.get("plan")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
self.disk_usage = user_can_be_see["disk_usage"]
self.owned_private_repos_count = user_can_be_see[
"owned_private_repos_count"
]
self.total_private_repos_count = user_can_be_see[
"total_private_repos_count"
]
self.plan = user_can_be_see.get("plan")
self.disk_usage = user_can_be_seen["disk_usage"]
self.owned_private_repos_count = user_can_be_seen[
"owned_private_repos_count"
]
self.total_private_repos_count = user_can_be_seen[
"total_private_repos_count"
]
self.plan = user_can_be_seen.get("plan")

@omgjlk
Copy link
Collaborator

omgjlk commented Aug 12, 2020

Ah, the status test was removed upstream after this PR was opened. Needs another commit to drop that test out.

@omgjlk
Copy link
Collaborator

omgjlk commented Aug 12, 2020

Actually I think this should simply be closed as a dupe of #992 which has a bit cleaner of an approach. I appreciate the work you did on this though!

@omgjlk omgjlk closed this Aug 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants