1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

PR review updates

This commit is contained in:
John Anderson
2020-07-03 11:55:04 -04:00
parent f98fa364c0
commit f092c107b5
17 changed files with 178 additions and 123 deletions

View File

@@ -0,0 +1,22 @@
# Generated by Django 3.0.7 on 2020-06-23 02:28
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('extras', '0042_customfield_manager'),
]
operations = [
migrations.CreateModel(
name='Report',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False)),
],
options={
'managed': False,
},
)
]

View File

@@ -13,15 +13,11 @@ def convert_job_results(apps, schema_editor):
"""
Convert ReportResult objects to JobResult objects
"""
from django.contrib.contenttypes.management import create_contenttypes
from extras.choices import JobResultStatusChoices
ReportResult = apps.get_model('extras', 'ReportResult')
JobResult = apps.get_model('extras', 'JobResult')
ContentType = apps.get_model('contenttypes', 'ContentType')
app_config = apps.get_app_config('extras')
app_config.models_module = app_config.models_module or True
create_contenttypes(app_config)
report_content_type = ContentType.objects.get(app_label='extras', model='report')
job_results = []
@@ -50,19 +46,10 @@ class Migration(migrations.Migration):
dependencies = [
('contenttypes', '0002_remove_content_type_name'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('extras', '0042_customfield_manager'),
('extras', '0043_report_model'),
]
operations = [
migrations.CreateModel(
name='Report',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False)),
],
options={
'managed': False,
},
),
migrations.CreateModel(
name='JobResult',
fields=[