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

Publish time usage implementation in queryset may result to empty queryset #22

Closed
sveetch opened this issue Jul 12, 2021 · 1 comment
Closed
Labels
Bug Something isn't working

Comments

@sveetch
Copy link
Member

sveetch commented Jul 12, 2021

Usage of "publish_time" field in BasePublishedQuerySet.get_published (and get_unpublished) may sometime returns an empty queryset.

It does not happen in tests since we forced a fixed neutral datetime, it is only reproducible for now on frontend when running development server.

This is often raised during night around after midgnight. This is likely to be caused by the fact we use a combination of a date field and a time field which are not technically the same thing that a singular datetime in a queryset.

First thing it to create an unittest to reproduce this wrong behavior in test environment, then fix it.

@sveetch sveetch added the Bug Something isn't working label Jul 12, 2021
@sveetch
Copy link
Member Author

sveetch commented Jul 12, 2021

The better way to fix would be to get back to a datetime but for now i don't even remember why did i splitted this to distinct date and time fields and so i don't see what the migration would involve..

sveetch added a commit that referenced this issue Jul 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant