lookit / lookit-api

Codebase for Lookit v2 and Experimenter v2. Includes an API. Docs: http://lookit.readthedocs.io/
https://lookit.mit.edu/
MIT License
10 stars 18 forks source link

Add country + state from demographic data to session data on consent ruling page (Closes #1291) #1305

Closed bleonar5 closed 10 months ago

bleonar5 commented 10 months ago

This PR is in response to issue #1291

Now, on the consent ruling page for a study, when a user clicks on a given consent to rule on, the user's location will be collated with the rest of the info under "Session Data"

The changes required for this were fairly minimal. The consent_ruling data query already grabs "demographic_snapshot_id" from the response row, so I just had to add "demographic_snapshot" when calling "select_related" for "child" and "child__user".

Screenshot 2023-11-09 at 3 43 45 PM
okaycj commented 10 months ago
  1. This is actually a pre-commit hook for me, which is really useful. Not sure what you might have to do to set that up?

This should take care of it: poetry run pre-commit install --install-hooks

This should also be a makefile target.

sonarcloud[bot] commented 10 months ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

bleonar5 commented 10 months ago

applied linting changes and confirmed that country + state are blank, not None, in the database model. Going ahead and merging