# Copyright © Michal Čihař <michal@weblate.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later

# Generated by Django 3.2.6 on 2021-11-26 19:25

from django.db import migrations


def fix_commit_age(apps, schema_editor):
    Component = apps.get_model("trans", "Component")
    Component.objects.using(schema_editor.connection.alias).filter(
        commit_pending_age__gt=2160
    ).update(commit_pending_age=2160)


class Migration(migrations.Migration):

    dependencies = [
        ("trans", "0139_alter_component_repoweb"),
    ]

    operations = [
        migrations.RunPython(fix_commit_age, migrations.RunPython.noop, elidable=True)
    ]
