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

Change user sort key and improve /peek #43

Merged
merged 1 commit into from
Feb 18, 2024

Conversation

elliotgoodrich
Copy link
Owner

Improve /peek by displaying users who have not nominated any films yet. This is part of the way to moving all the information in /naughty to /peek.

In order to support this, we need to be able to query the film name and vote count by user. We probably should be duplicating this information into the user record, which is the noSQL way. However, if we change the sort key for users from USER# to DISCORDUSER#, then we are able to grab all users and FILM#NOMINATION# entries with one query because they would be next to each other alphabetically.

In an unrelated change - that really should be a separate change - we fix some of the datetime imports that no longer work on Python 3.9.

Improve `/peek` by displaying users who have not nominated any films
yet.  This is part of the way to moving all the information in
`/naughty` to `/peek`.

In order to support this, we need to be able to query the film name and
vote count by user.  We probably should be duplicating this information
into the user record, which is the noSQL way.  However, if we change the
sort key for users from `USER#` to `DISCORDUSER#`, then we are able to
grab all users and `FILM#NOMINATION#` entries with one query because
they would be next to each other alphabetically.

In an unrelated change - that really should be a separate change - we
fix some of the `datetime` imports that no longer work on Python 3.9.
@elliotgoodrich elliotgoodrich merged commit 3e90b59 into master Feb 18, 2024
2 checks passed
@elliotgoodrich elliotgoodrich deleted the add-more-info-to-peek branch February 21, 2024 06:46
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.

1 participant