title: Django error: get() returned more than one userData -- it returned 2
body: <p>I am trying to build a coupon system in Django, and here I'm trying to display the balance that a person has with a vendor by comparing the database, after pressing the submit button. However, I'm facing the above mentioned error. </p>
  
  <p>Here is the html:</p>
  
  <pre><code>{% block content %}
     &lt;div class="container"&gt;
     &lt;h1&gt;Welcome to your page, @{{ user.username }}&lt;/h1&gt;
     &lt;h3&gt;Select vendor to check your balance!&lt;/h3&gt;
     &lt;br&gt;
  &lt;form method="POST" class="form"&gt;
      {% csrf_token %}
      {% bootstrap_form form %}
      {% buttons %}
      &lt;button type="submit" class="btn btn-primary"&gt;Check Balance&lt;/button&gt;
      {% endbuttons %}
  &lt;/form&gt;
  {% if args.model %}
     &lt;h4&gt;You need to pay Rs {{ args.model }} to vendor {{ args.choice }}    
     &lt;/h4&gt;
  
      {% endif %}
  &lt;/div&gt;
  {% endblock %}
  </code></pre>
  
  <p>The urls.py:</p>
  
  <pre><code>from django.urls import path
  from django.contrib.auth import views as auth_views
  from . import views
  
  app_name = 'profiles'
  
  urlpatterns = [
      path('adminKaLogin/', views.adminKaPage, name="adminHome"),
      path('userLogin/', views.userKaLog, name="userHome"),
  ]
  </code></pre>
  
  <p>The forms.py</p>
  
  <pre><code>from django import forms
  from django.contrib.auth import get_user_model
  
  vendor_choices = [
      ('1','Vendor 1'),('2',"Vendor 2"), ("3", "Vendor 3"),
  ]    
  
  class select_vendor_form(forms.Form):
      Vendor_choices = forms.ChoiceField(choices=vendor_choices,
                                  widget=forms.RadioSelect)
  </code></pre>
  
  <p>The views.py</p>
  
  <pre><code>def userKaLog(request):
      form = select_vendor_form()
      if request.method=="POST":
          form = select_vendor_form(request.POST)
          if form.is_valid():
              choice = form.cleaned_data['Vendor_choices']
              records = userData.objects.get(vendor_number = choice)
              args = {'form': form, 'choice': choice, 'model':records}
              return render(request, 'profiles/userLogin.html', args)
      return render(request, 'profiles/userLogin.html', {'form': form})
  </code></pre>
  
  <p>The models.py:</p>
  
  <pre><code> from django.db import models
  from datetime import datetime
  from django.contrib.auth.models import User 
  
  class userData(models.Model):
      name = models.OneToOneField(User, on_delete=models.CASCADE)
      balance = models.IntegerField()
      date_of_payment = models.DateTimeField(default = datetime.now())
      vendor_number  = models.IntegerField()
  </code></pre>
  
  <p>If the person selects radio button of vendor 2, the output should be the total money owed to vendor 2 by that user. The user I had logged in with has balance with vendor 2. Maybe this is why 2 is being returned? I am unable to get where I am going wrong.</p>