Skip to content

Commit

Permalink
Merge pull request #313 from mediasuitenz/fix-migrations-on-custom-db
Browse files Browse the repository at this point in the history
Fix migrations when used in condition with a custom DB.
  • Loading branch information
giovannicimolin authored Oct 10, 2023
2 parents 72e91e4 + 6683306 commit bc7c284
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion knox/migrations/0006_auto_20160818_0932.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

def cleanup_tokens(apps, schema_editor):
AuthToken = apps.get_model('knox', 'AuthToken')
AuthToken.objects.filter(token_key__isnull=True).delete()
AuthToken.objects.using(schema_editor.connection.alias).filter(token_key__isnull=True).delete()


class Migration(migrations.Migration):
Expand Down

0 comments on commit bc7c284

Please sign in to comment.