Skip to content
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

fix grants explorer #9559

Merged
merged 1 commit into from
Oct 4, 2021
Merged

fix grants explorer #9559

merged 1 commit into from
Oct 4, 2021

Conversation

chibie
Copy link
Contributor

@chibie chibie commented Oct 4, 2021

Description

grants explorer broke due get_clr_rounds_metadata update

Refers/Fixes

https://gitcoincore.slack.com/archives/CDML7FS7M/p1633365131046300

Testing

@@ -51,7 +51,7 @@ def add_arguments(self, parser):

def handle(self, *args, **options):

_, round_start_date, round_end_date, _ = get_clr_rounds_metadata()
_, round_start_date, round_end_date, _, _, _, _, _ = get_clr_rounds_metadata()
Copy link
Contributor

Choose a reason for hiding this comment

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

@chibie This is a quick fix, but this method is extremely fragile. It feels like it should be returning an object, not a tuple that we can access data on without guessing how many and where the _ should go. I approve this so we can fix the deploy, but let's open a new tech debt ticket in Jira to fix this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ksolo yea makes perfect sense

Copy link
Contributor

Choose a reason for hiding this comment

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

Using a named tuple would likely provide enough of an abstraction to prevent these types of bugs - https://docs.python.org/3/library/collections.html#collections.namedtuple

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ticket is GITC-477

@chibie chibie merged commit 34527d8 into master Oct 4, 2021
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.

3 participants