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 results for queries with time tags and aggregate functions #2504

Merged
merged 2 commits into from
Jul 25, 2017

Conversation

slosd
Copy link
Contributor

@slosd slosd commented Jul 25, 2017

This fixes issues as reported in #2200.

Tags related to times weren't correctly identified when combined with an aggregate function which produced wrong query results.

if self._ftag in TIME_TAGS:
# Strip aggregate function from tag
func_start = self._ftag.find(":")
tag = self._ftag[:func_start] if func_start >= 0 else self._ftag
Copy link
Member

Choose a reason for hiding this comment

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

tag = self._ftag.split(":", 1)[0] is handy for such things, but this is ok too.

@lazka
Copy link
Member

lazka commented Jul 25, 2017

Please add a test for this

@lazka lazka merged commit c624d91 into quodlibet:master Jul 25, 2017
@lazka
Copy link
Member

lazka commented Jul 25, 2017

Thanks

@slosd
Copy link
Contributor Author

slosd commented Jul 25, 2017

👍
Just as a reminder, this fixes #2200

@declension
Copy link
Member

Thanks @slosd

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