Completed
Push — master ( c0c2a1...e4f1e8 )
by Paolo
01:28 queued 01:04
created

image_app.migrations.0021_validationsummary   A

Complexity

Total Complexity 0

Size/Duplication

Total Lines 28
Duplicated Lines 64.29 %

Importance

Changes 0
Metric Value
wmc 0
eloc 20
dl 18
loc 28
rs 10
c 0
b 0
f 0

How to fix   Duplicated Code   

Duplicated Code

Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.

Common duplication problems, and corresponding solutions are:

1
# -*- coding: utf-8 -*-
2
# Generated by Django 1.11.20 on 2019-06-13 08:44
3
from __future__ import unicode_literals
4
5
import django.contrib.postgres.fields
6
from django.db import migrations, models
7
import django.db.models.deletion
8
9
10 View Code Duplication
class Migration(migrations.Migration):
1 ignored issue
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
11
12
    dependencies = [
13
        ('image_app', '0020_auto_20190527_1729'),
14
    ]
15
16
    operations = [
17
        migrations.CreateModel(
18
            name='ValidationSummary',
19
            fields=[
20
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
21
                ('pass_count', models.PositiveIntegerField(default=0)),
22
                ('warning_count', models.PositiveIntegerField(default=0)),
23
                ('error_count', models.PositiveIntegerField(default=0)),
24
                ('json_count', models.PositiveIntegerField(default=0)),
25
                ('type', models.CharField(blank=True, max_length=6, null=True)),
26
                ('messages', django.contrib.postgres.fields.ArrayField(base_field=models.TextField(blank=True, max_length=255), default=list, size=None)),
27
                ('submission', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='image_app.Submission')),
28
            ],
29
        ),
30
    ]
31