diff options
author | 2018-05-31 13:50:49 +0100 | |
---|---|---|
committer | 2018-05-31 13:50:49 +0100 | |
commit | c4c107ad6d3093d9d33ffb4f41a10e59efaddb45 (patch) | |
tree | 6ebd27b62b6e58e947c119f9f62866b9ec93c2fb /pysite/views/main/jams/profile.py | |
parent | Switch constants around (diff) |
Update privacy policy and related migrations
* Don't collect DOB anymore, and remove it from database
* Make doubly-sure all emails are gone because I'm paranoid and "update" doesn't do what it sounds like
Diffstat (limited to 'pysite/views/main/jams/profile.py')
-rw-r--r-- | pysite/views/main/jams/profile.py | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/pysite/views/main/jams/profile.py b/pysite/views/main/jams/profile.py index d8a663f7..f84534e6 100644 --- a/pysite/views/main/jams/profile.py +++ b/pysite/views/main/jams/profile.py @@ -1,5 +1,3 @@ -import datetime - from flask import redirect, request, url_for from werkzeug.exceptions import BadRequest @@ -47,24 +45,12 @@ class JamsProfileView(RouteView, DBMixin, OAuthMixin): if not participant: participant = {"id": self.user_data["user_id"]} - dob = request.form.get("dob") github_username = request.form.get("github_username") timezone = request.form.get("timezone") - if not dob or not github_username or not timezone: + if not github_username or not timezone: return BadRequest() - # Convert given datetime strings into actual objects, adding timezones to keep rethinkdb happy - dob = datetime.datetime.strptime(dob, "%Y-%m-%d") - dob = dob.replace(tzinfo=datetime.timezone.utc) - - now = datetime.datetime.now(tz=datetime.timezone.utc) - then = now.replace(year=now.year - 13) - - if then < dob: - raise BadRequest() # They're too young, but this is validated on the form - - participant["dob"] = dob participant["github_username"] = github_username participant["timezone"] = timezone |