consent/views.py
def has_consent(request: HttpRequest, entityid_b64: str, consentid: str) -> HttpResponse:
    """ Test if a consent exists for a given active entityID/consentid pair """
    entityid_bytes = base64.urlsafe_b64decode(entityid_b64.encode('ascii'))
    try:
        _ = Consent.objects.get(entityID=entityid_bytes.decode('ascii'), consentid=consentid, revoked_at=None)
        return HttpResponse('true', status=200)
    except ObjectDoesNotExist:
        return HttpResponse('false', status=200)
 Test if a consent exists for a given active entityID/consentid pair 
Test if a consent exists for a given active entityID/consentid pair
Test if a consent exists for a given active entityID / consentid pair
def has_consent(request: HttpRequest, entityid_b64: str, consentid: str) -> HttpResponse:
    entityid_bytes = base64.urlsafe_b64decode(entityid_b64.encode('ascii'))
    try:
        _ = Consent.objects.get(entityID=entityid_bytes.decode('ascii'), consentid=consentid, revoked_at=None)
        return HttpResponse('true', status=200)
    except ObjectDoesNotExist:
        return HttpResponse('false', status=200)
def has_consent ( request : HttpRequest , entityid_b64 : str , consentid : str ) -> HttpResponse : entityid_bytes = base64 . urlsafe_b64decode ( entityid_b64 . encode ( 'ascii' ) ) try : _ = Consent . objects . get ( entityID = entityid_bytes . decode ( 'ascii' ) , consentid = consentid , revoked_at = None ) return HttpResponse ( 'true' , status = 200 ) except ObjectDoesNotExist : return HttpResponse ( 'false' , status = 200 )
Test if a consent exists for a given active entityID/consentid pair
Test if a consent exists for a given active entityID / consentid pair
""" Test if a consent exists for a given active entityID/consentid pair """
request
HttpRequest
entityid_b64
str
consentid
str