Skip to content

Commit a963a22

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent f97aaa1 commit a963a22

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

simple_history/management/commands/clean_duplicate_history.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,15 @@ def _process(self, to_process, date_back=None, dry_run=True):
9292
model_query = model_query.filter(
9393
pk__in=(m_qs.values_list(model._meta.pk.name).distinct())
9494
)
95+
9596
def get_backend_name(model_class):
9697
from django.db import connections, router
98+
9799
db_alias = router.db_for_read(model_class)
98100
return connections[db_alias].engine
99101

100102
backend_name = get_backend_name(model)
101-
if backend_name != 'mssql':
103+
if backend_name != "mssql":
102104
_iterator = model_query.iterator()
103105
else:
104106
_iterator = model_query

0 commit comments

Comments
 (0)