r4fek / django-cassandra-engine

Django Cassandra Engine - the Cassandra backend for Django
BSD 2-Clause "Simplified" License
364 stars 85 forks source link

TypeError: sql_flush() got an unexpected keyword argument 'reset_sequences' #140

Closed taketrendpiotr closed 3 years ago

taketrendpiotr commented 4 years ago

Looks like the signature of sql_flush() got changed in Django 3.1, which makes tests fail with:

File "django_cassandra_engine/management/commands/flush.py", line 26, in handle
  return super(Command, self).handle(**options)
File "django/core/management/commands/flush.py", line 49, in handle
  allow_cascade=allow_cascade)
File "django/core/management/sql.py", line 20, in sql_flush
  allow_cascade=allow_cascade,
TypeError: sql_flush() got an unexpected keyword argument 'reset_sequences'

Looks like 'sequences' argument isn't used, so a simple change in signature of django_cassandra_engine.base.operations.CassandraDatabaseOperations.sql_flush to match Django could fix this.

edhowler commented 3 years ago

Waiting for this fix, thanks!

r4fek commented 3 years ago

Sorry for such late fix, but I finally managed to release it. Please try version 1.6.2 ;)