physionet-build icon indicating copy to clipboard operation
physionet-build copied to clipboard

credential_application doesn't record what code of conduct was agreed to

Open bemoody opened this issue 10 months ago • 1 comments

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

bemoody avatar Oct 11 '23 21:10 bemoody