I need to check my object related or not ORM postgresql/
I have two object ItemVariationValue and ItemVariation i need to check ItemVariationValue has relation with ItemVariation
models.py
class ItemVariation(models.Model):
    item=models.ForeignKey(Item,on_delete=models.CASCADE)
    price=models.IntegerField(blank=True,null=True,default=0)
    item_code=models.CharField(max_length=500)
    keywords= models.ManyToManyField(Keyword)
    image=models.ImageField(upload_to='dishes/', blank=True, null=True)
    def __str__(self):
        return str(self.id)
class ItemVariationValue(models.Model):
    item=models.ForeignKey(Item,on_delete=models.CASCADE)
    item_variation=models.ForeignKey(ItemVariation,on_delete=models.CASCADE)
    attribute=models.ForeignKey(Attribute,on_delete=models.CASCADE)
    attribute_value=models.ForeignKey(AttributeValue,on_delete=models.CASCADE)
    def __str__(self):
        return str(self.id)
views.py
def get_items(request):    # request= {"order_details": "varxxx:1"}
    order=request.data['order_details']
    items = order.split(',')
    total = 0
    for item in items:
        od = item.split(':')
        sku = str(od[0])
        qty = int(od[1])
        itemvariation=ItemVariation.objects.get(item_code=sku)
# if ItemVariationValue.item_variation has ForeignKey(ItemVariation):