Re: Matching logic is case sensitive when I want it case insensitive

2015-01-06 Thread joboppsgpp
This worked beautifully. Thanks Vijay! (ps thanks for the suggestions regarding a long-term solution). -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-u

Re: Matching logic is case sensitive when I want it case insensitive

2015-01-06 Thread Vijay Khemlani
on line 12 you would need a more complex logic try: obj = SocialAccount.objects.get(social_profile=profile, service=service, value__iexact=value) except SocialAccount.DoesNotExist: obj = SocialAccount.objects.create(social_profile=profile, service=service, value=value) (assuming "value" i

Matching logic is case sensitive when I want it case insensitive

2015-01-06 Thread joboppsgpp
Hi, I have a bug where when I upload data from a csv into my database into a model that houses social accounts (eg a twitter value, a facebook value etc) it is adding new social account objects if there's a discrepency between the casing of the value in the csv and the value that is already in