Merging Jamie and Sara December 2 work

dj111py38
Mark Jenkins 2015-12-02 16:22:05 -06:00
commit d8ab35feb6
1 changed files with 3 additions and 1 deletions

View File

@ -27,6 +27,7 @@ import logging
import random
from hashlib import md5
import re
from uuid import uuid4
try:
@ -987,7 +988,8 @@ def generate_run(request, questionnaire_id, subject_id=None):
su = Subject(givenname='Anonymous', surname='User')
su.save()
str_to_hash = "".join(map(lambda i: chr(random.randint(0, 255)), range(16)))
# str_to_hash = "".join(map(lambda i: chr(random.randint(0, 255)), range(16)))
str_to_hash = str(uuid4())
str_to_hash += settings.SECRET_KEY
key = md5(str_to_hash).hexdigest()