Django object has no attribute
I have a bulk Update. Each message created I need to call .send(gateway)
This is what I have tried:
objs = [
Message(
recipient_number=e.mobile,
content=content,
sender=e.contact_owner,
billee=user,
sender_name=sender
).send(gateway)
for e in query
]
# Send messages to DB
Message.objects.bulk_create(objs)
I get this error:
Task Request to Process with id 3ab72d3c-5fd8-4b7d-8cc5-e0400455334f
raised exception: 'AttributeError("\'NoneType\' object has no attribute
\'pk\'",)'
why?
No comments:
Post a Comment