I have the following -
obj.owner_id = Owner.objects.filter(owner_name=owner_obj).values_list('owner_id')[0] Problem is the value it's returning is a tuple. Specifically this -
(786,) All I want to return is the integer value or 786.
What am I doing wrong?
Owner.objects.filter(owner_name='Operations').values_list('owner_id')[0][0]?Owner.objects.filter(owner_name='Operations').values_list('owner_id', flat=True)[0]