Created
April 11, 2018 14:06
-
-
Save adngdb/a8d8568df40eaef65139b9e399678d1c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# Generated by Django 1.11.11 on 2018-04-11 13:36 | |
from __future__ import unicode_literals | |
from django.db import migrations | |
from pontoon.base.models import TranslatedResource | |
def calculate_all_stats(apps, schema_editor): | |
translated_resources = TranslatedResource.objects.all() | |
for tr in translated_resources: | |
tr.calculate_stats() | |
class Migration(migrations.Migration): | |
dependencies = [ | |
('base', '0119_rename_translated_to_unreviewed'), | |
] | |
operations = [ | |
migrations.RunPython( | |
calculate_all_stats, | |
migrations.RunPython.noop | |
), | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment