title: TypeError: int() argument must be a string, a bytes-like object or a number, not 'DCountry'
body: <p>I am getting the captioned error whenever i try the below code:</p>
  
  <pre><code>DCountryObj = DCountry.objects.filter(CountryCode=NewInputRefObj.CountryCode).get()
  </code></pre>
  
  <p>I dont quite understand what its talking about because I am simply taking the countrycode from one object  to use in a filter for another model object creation. See relevant models:</p>
  
  <pre><code>class DCountry(models.Model):
      CountryCode = models.IntegerField(primary_key=True)
      Country = models.CharField(max_length=15)
      SPI = models.IntegerField()
  
      def __str__(self):
          return self.Country
  </code></pre>
  
  <p>NewInputRefObj refers to  a object made from the following model:</p>
  
  <pre><code>class InputRef (models.Model):
      CountryCode = models.ForeignKey(DCountry, on_delete=models.CASCADE)
  </code></pre>
  
  <p>Please point me in the right direction for what I should try here because i dont understand why its saying it has an issues with int()??? </p>