From 198c060c3b2b946685fa4f8762106db9e1499cb5 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 19 Jan 2026 19:43:03 +0100 Subject: [PATCH] [pre-commit.ci] pre-commit autoupdate (#799) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [pre-commit.ci] pre-commit autoupdate updates: - [github.com/psf/black-pre-commit-mirror: 25.12.0 → 26.1.0](https://github.com/psf/black-pre-commit-mirror/compare/25.12.0...26.1.0) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- auditlog/management/commands/auditlogmigratejson.py | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c33061f..cd9ef2a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,7 +1,7 @@ --- repos: - repo: https://github.com/psf/black-pre-commit-mirror - rev: 25.12.0 + rev: 26.1.0 hooks: - id: black language_version: python3.10 diff --git a/auditlog/management/commands/auditlogmigratejson.py b/auditlog/management/commands/auditlogmigratejson.py index 8b1dbeb..beb0d2b 100644 --- a/auditlog/management/commands/auditlogmigratejson.py +++ b/auditlog/management/commands/auditlogmigratejson.py @@ -126,15 +126,13 @@ class Command(BaseCommand): def postgres(): with connection.cursor() as cursor: - cursor.execute( - f""" + cursor.execute(f""" UPDATE {LogEntry._meta.db_table} SET changes="changes_text"::jsonb WHERE changes_text IS NOT NULL AND changes_text <> '' AND changes IS NULL - """ - ) + """) return cursor.cursor.rowcount if database == "postgres":