Hi guys
I'm on Django 1.10, and as described shortly here:
https://dpaste.de/Bgao, I have created an abstract user profile which is tied to Django's User model with OneToOneField relationship. So I have AbstractProfile, and then there are IndividualProfile and BusinessProfile, each of which inherits from AbstractProfile.
The problem I have, is that, whenever I have a user object instance (i.e. u = User.objects.get(pk=1234)), I'm not sure how to determine whether the profile is of type Individual or Business.
So either u.individualprofile or u.businessprofile throws an error, and obviously I want to avoid having errors.
Any help is appreciated. Thanks