physionet-build
physionet-build copied to clipboard
credential_application doesn't record what code of conduct was agreed to
user/views.py:
@login_required
def credential_application(request):
...
if request.method == 'POST':
...
CodeOfConductSignature.objects.get_or_create(
code_of_conduct=CodeOfConduct.objects.filter(is_active=True).first(),
user=request.user,
)
...
This does not record which code of conduct the person agreed to (the one that was displayed on the page.) It records which code of conduct was the "first" (*) active code of conduct at the time the form submission was received.
(*) i.e., probably the one with the smallest primary key, but it's unspecified