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 unlisted tracks in track upload challenge #2382

Merged
merged 4 commits into from
Jan 25, 2022
Merged

Fix unlisted tracks in track upload challenge #2382

merged 4 commits into from
Jan 25, 2022

Conversation

piazzatron
Copy link
Contributor

Description

Stop counting unlisted tracks towards track upload completion.

Tests

How will this change be monitored?

@@ -135,6 +150,17 @@ def test_track_upload_challenge(app):
assert user_challenge.current_step_count == 1
assert not user_challenge.is_complete

# Ensure unlisted track is not counted
session.add(unlisted_track)
bus.dispatch(ChallengeEvent.track_upload, 30000000, 1)
Copy link
Member

Choose a reason for hiding this comment

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

should this be 30000001?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

shouldn't affect the test but for consistency yep, will change

@@ -58,6 +58,7 @@ def _get_num_track_uploads_by_user(
Track.blocknumber >= block_number,
Track.is_current == True,
Track.is_delete == False,
Track.is_unlisted == False
Copy link
Member

Choose a reason for hiding this comment

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

should we do a stem check too?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

great idea

@pull-request-size pull-request-size bot added size/M and removed size/S labels Jan 25, 2022
@piazzatron piazzatron merged commit 16f9473 into master Jan 25, 2022
@piazzatron piazzatron deleted the aud-1327 branch January 25, 2022 23:07
piazzatron added a commit that referenced this pull request Jan 25, 2022
* Fix unlisted tracks in track upload challenge

* PR revisions

* Fix lint
@AudiusProject AudiusProject deleted a comment from linear bot Sep 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants