Closed faithNassiwa closed 7 years ago
Temporal Fix:
Use filter and get first existence instead of plain get.
contact = Contact.objects.filter(uuid=message.contact.uuid).first()
I think we have different code. I don't have "contact = Contact.objects.get(uuid=message.contact.uuid)" anywhere in my code.
Its in the Contact Model, review the save_contact method. It does not make sense why they would exist more than one but for some reason not known to me as of now it seems their are these occurrences as per the error returned. The above done is a temporal fix as we should not have more than one occurrence and need to figure out what is causing it.
That error is from the save the save_message method. "in save_messages contact = Contact.objects.get(uuid=message.contact.uuid)" I do not see how it is attached to the save_contact method. Aren't uuid unique?
Sorry, actually its missing you your code base. Lets conclude this tomorrow.