Saving database changes with django channels

You should be calling the database_sync_to_async method, and not the save method directly:

async def receive(self, text_data):
        ...
        await database_sync_to_async(self.counter.save)()
        ...

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top