|
|
@@ -1,24 +1,23 @@
|
|
|
-# Generated by Django 3.0.7 on 2020-06-23 02:28
|
|
|
-
|
|
|
import uuid
|
|
|
|
|
|
-from django.conf import settings
|
|
|
import django.contrib.postgres.fields.jsonb
|
|
|
-from django.db import migrations, models
|
|
|
import django.db.models.deletion
|
|
|
+from django.conf import settings
|
|
|
+from django.db import migrations, models
|
|
|
+
|
|
|
import extras.utils
|
|
|
+from extras.choices import JobResultStatusChoices
|
|
|
|
|
|
|
|
|
def convert_job_results(apps, schema_editor):
|
|
|
"""
|
|
|
Convert ReportResult objects to JobResult objects
|
|
|
"""
|
|
|
- from extras.choices import JobResultStatusChoices
|
|
|
-
|
|
|
+ Report = apps.get_model('extras', 'Report')
|
|
|
ReportResult = apps.get_model('extras', 'ReportResult')
|
|
|
JobResult = apps.get_model('extras', 'JobResult')
|
|
|
ContentType = apps.get_model('contenttypes', 'ContentType')
|
|
|
- report_content_type = ContentType.objects.get(app_label='extras', model='report')
|
|
|
+ report_content_type = ContentType.objects.get_for_model(Report)
|
|
|
|
|
|
job_results = []
|
|
|
for report_result in ReportResult.objects.all():
|
|
|
@@ -46,7 +45,7 @@ class Migration(migrations.Migration):
|
|
|
dependencies = [
|
|
|
('contenttypes', '0002_remove_content_type_name'),
|
|
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
|
|
- ('extras', '0043_report_model'),
|
|
|
+ ('extras', '0043_report'),
|
|
|
]
|
|
|
|
|
|
operations = [
|