This commit is contained in:
bakatrouble 2019-01-30 20:20:26 +03:00
parent eaca6bd10f
commit 2fa592273d

View File

@ -49,8 +49,7 @@ class Chat(models.Model):
obj.photo_id = chat.photo.small_file_id
obj.save()
if created:
transaction.commit()
collect_new_messages.delay(obj.pk)
transaction.on_commit(lambda: collect_new_messages.delay(obj.pk))
return obj
def __str__(self):