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

validation.migrations.0004_validationsummary   A

Complexity

Total Complexity 0

Size/Duplication

Total Lines 30
Duplicated Lines 66.67 %

Importance

Changes 0
Metric Value
wmc 0
eloc 22
dl 20
loc 30
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.21 on 2019-06-14 13:00
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', '0022_auto_20190614_1500'),
14
        ('validation', '0003_auto_20190326_1133'),
15
    ]
16
17
    operations = [
18
        migrations.CreateModel(
19
            name='ValidationSummary',
20
            fields=[
21
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
22
                ('all_count', models.PositiveIntegerField(default=0)),
23
                ('pass_count', models.PositiveIntegerField(default=0)),
24
                ('warning_count', models.PositiveIntegerField(default=0)),
25
                ('error_count', models.PositiveIntegerField(default=0)),
26
                ('json_count', models.PositiveIntegerField(default=0)),
27
                ('type', models.CharField(blank=True, max_length=6, null=True)),
28
                ('messages', django.contrib.postgres.fields.ArrayField(base_field=models.TextField(blank=True, max_length=255), default=list, size=None)),
29
                ('submission', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='image_app.Submission')),
30
            ],
31
        ),
32
    ]
33