title: If statement gives wrong output in query set
body: <p>I'm getting the incorrect output of a query set when I use <code>request.method == 'POST' and selectedaccesslevel == '#'</code> showing as <code>&lt;QuerySet ['S00009']&gt;</code> when it's written to the database.</p>
  
  <p>I believe I should be using a get since i'm expecting one value, but how do I filter my get on coid = owner.coid.coid and provide the value ?level?</p>
  
  <p>I'm looking for my output for datareducecode to be 'S00009' and not <code>&lt;QuerySet ['S00009']&gt;.</code>  How can I accomplish this?  Below is my view...</p>
  
  <pre><code>def submitted(request):
  
  
  
      owner = User.objects.get (formattedusername=request.user.formattedusername)
      checkedlist = request.POST.getlist('report_id')
      print (f"checkedlist on submitted:{checkedlist}")
      access_request_date = timezone.now()
  
      coid = User.objects.filter(coid = request.user.coid.coid).filter(formattedusername=request.user.formattedusername)
      datareducecode = OrgLevel.objects.distinct().filter(coid=request.user.coid.coid)
  #    facilitycfo =  QvDatareducecfo.objects.filter(dr_code__exact = coid, active = 1, cfo_type = 1).values_list('cfo_ntname', flat = True)
  #    divisioncfo =  QvDatareducecfo.objects.filter(dr_code__exact = coid, active = 1, cfo_type = 2).values_list('cfo_ntname', flat = True)
  #    print(facilitycfo)
  #    print(divisioncfo)
      selectedaccesslevel = request.POST.get('accesslevelid')
      print (f"accesslevel:{selectedaccesslevel}")
  
      selectedphi = request.POST.get('phi')
      print (f"phi:{selectedphi}")
  
      print (owner.coid.coid)
  
      if request.method == 'POST' and selectedaccesslevel == '3':
          datareducecode = OrgLevel.objects.filter(coid__exact = owner.coid.coid).values_list('slevel', flat = True)
          print (datareducecode)
          if request.method == 'POST' and selectedaccesslevel == '4':
              datareducecode = OrgLevel.objects.filter(coid__exact = owner.coid.coid).values_list('blevel', flat = True)
              print (datareducecode)
              if request.method == 'POST' and selectedaccesslevel == '5':
                  datareducecode = OrgLevel.objects.filter(coid__exact = owner.coid.coid).values_list('rlevel', flat = True)
                  print (datareducecode)
                  if request.method == 'POST' and selectedaccesslevel == '6':
                      datareducecode = OrgLevel.objects.filter(coid__exact = owner.coid.coid).values_list('dlevel', flat = True)
                      print (datareducecode)
                      if request.method == 'POST' and selectedaccesslevel == '7':
                          datareducecode = OrgLevel.objects.filter(coid__exact = owner.coid.coid).values_list('f"Z{Coid}"', flat = True)
                          print (datareducecode)
      else:
          datareducecode = 'No Match on Coid'
          print (datareducecode)
  
      for i in checkedlist:
          requestsave = QVFormAccessRequest(ntname = owner.formattedusername, first_name = owner.first_name, last_name = owner.last_name, coid = owner.coid.coid, facility = owner.facility, title = owner.title
                                            ,report_id = i, accesslevel_id = selectedaccesslevel, phi = selectedphi , access_beg_date = access_request_date, datareducecode = datareducecode )
          requestsave.save()
  
  #    print (datareducecode)
      return JsonResponse({'is_success':True})
  </code></pre>