559Labs/django-dtg-store-manager

View on GitHub

Showing 302 of 302 total issues

File models.py has 1462 lines of code (exceeds 250 allowed). Consider refactoring.
Open

from django.conf import settings
from fractions import Fraction

from django.contrib.contenttypes.fields import GenericForeignKey
from django.contrib.contenttypes.models import ContentType
Severity: Major
Found in src/business/models.py - About 3 days to fix

    File all.py has 1307 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    from django.core.urlresolvers import reverse
    
    from django.http import HttpResponse
    
    from django.shortcuts import render
    Severity: Major
    Found in src/business/views/all.py - About 3 days to fix

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

              if sData['billing_address']:
                  _state = pfState.objects.get(
                      code=sData['billing_address']['state_code'])
                  _country = pfCountry.objects.get(
                      code=sData['billing_address']['country_code'])
      Severity: Major
      Found in src/business/models.py and 1 other location - About 1 day to fix
      src/business/models.py on lines 206..220

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 210.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

              if sData['return_address']:
                  _state = pfState.objects.get(
                      code=sData['return_address']['state_code'])
                  _country = pfCountry.objects.get(
                      code=sData['return_address']['country_code'])
      Severity: Major
      Found in src/business/models.py and 1 other location - About 1 day to fix
      src/business/models.py on lines 187..200

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 210.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

      class appCreativeDesignCreate(CreateView):
          model = bzCreativeDesign
          form_class = bzCreativeDesignForm
          template_name = "business/object_form.html"
          success_url = reverse_lazy('business:app_creative_home')
      Severity: Major
      Found in src/business/views/app_creative.py and 1 other location - About 1 day to fix
      src/business/views/app_creative.py on lines 136..163

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 201.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

      class appCreativeLayoutCreate(CreateView):
          model = bzCreativeLayout
          form_class = bzCreativeLayoutForm
          template_name = "business/object_form.html"
          success_url = reverse_lazy('business:app_creative_home')
      Severity: Major
      Found in src/business/views/app_creative.py and 1 other location - About 1 day to fix
      src/business/views/app_creative.py on lines 89..116

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 201.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

      class commonUpdateView(UpdateView):
          model = None
          form_class = None
      
          object_name = None
      Severity: Major
      Found in src/business/helper_backend.py and 1 other location - About 1 day to fix
      src/business/helper_backend.py on lines 36..58

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 150.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

      class commonCreateView(CreateView):
          model = None
          form_class = None
      
          object_name = None
      Severity: Major
      Found in src/business/helper_backend.py and 1 other location - About 1 day to fix
      src/business/helper_backend.py on lines 61..83

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 150.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 6 locations. Consider refactoring.
      Open

      class appStoreBrandCreate(CreateView):
          model = bzBrand
          form_class = bzBrandForm
          template_name = "business/object_form.html"
          success_url = reverse_lazy('business:app_store_brand_list')
      Severity: Major
      Found in src/business/views/app_store.py and 5 other locations - About 1 day to fix
      src/business/views/app_store.py on lines 60..75
      src/business/views/app_store.py on lines 87..102
      src/business/views/app_store.py on lines 105..120
      src/business/views/app_store.py on lines 132..147
      src/business/views/app_store.py on lines 150..165

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 123.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 6 locations. Consider refactoring.
      Open

      class appStorePFUpdate(UpdateView):
          model = pfStore
          form_class = pfStoreForm
          template_name = "business/object_form.html"
          success_url = reverse_lazy('business:app_store_pf_list')
      Severity: Major
      Found in src/business/views/app_store.py and 5 other locations - About 1 day to fix
      src/business/views/app_store.py on lines 42..57
      src/business/views/app_store.py on lines 60..75
      src/business/views/app_store.py on lines 87..102
      src/business/views/app_store.py on lines 132..147
      src/business/views/app_store.py on lines 150..165

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 123.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 6 locations. Consider refactoring.
      Open

      class appStorePFCreate(CreateView):
          model = pfStore
          form_class = pfStoreForm
          template_name = "business/object_form.html"
          success_url = reverse_lazy('business:app_store_pf_list')
      Severity: Major
      Found in src/business/views/app_store.py and 5 other locations - About 1 day to fix
      src/business/views/app_store.py on lines 42..57
      src/business/views/app_store.py on lines 60..75
      src/business/views/app_store.py on lines 105..120
      src/business/views/app_store.py on lines 132..147
      src/business/views/app_store.py on lines 150..165

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 123.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 6 locations. Consider refactoring.
      Open

      class appStoreWPUpdate(UpdateView):
          model = wooStore
          form_class = wooStoreForm
          template_name = "business/object_form.html"
          success_url = reverse_lazy('business:app_store_wp_list')
      Severity: Major
      Found in src/business/views/app_store.py and 5 other locations - About 1 day to fix
      src/business/views/app_store.py on lines 42..57
      src/business/views/app_store.py on lines 60..75
      src/business/views/app_store.py on lines 87..102
      src/business/views/app_store.py on lines 105..120
      src/business/views/app_store.py on lines 132..147

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 123.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 6 locations. Consider refactoring.
      Open

      class appStoreBrandUpdate(UpdateView):
          model = bzBrand
          form_class = bzBrandForm
          template_name = "business/object_form.html"
          success_url = reverse_lazy('business:app_store_brand_list')
      Severity: Major
      Found in src/business/views/app_store.py and 5 other locations - About 1 day to fix
      src/business/views/app_store.py on lines 42..57
      src/business/views/app_store.py on lines 87..102
      src/business/views/app_store.py on lines 105..120
      src/business/views/app_store.py on lines 132..147
      src/business/views/app_store.py on lines 150..165

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 123.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 6 locations. Consider refactoring.
      Open

      class appStoreWPCreate(CreateView):
          model = wooStore
          form_class = wooStoreForm
          template_name = "business/object_form.html"
          success_url = reverse_lazy('business:app_store_wp_list')
      Severity: Major
      Found in src/business/views/app_store.py and 5 other locations - About 1 day to fix
      src/business/views/app_store.py on lines 42..57
      src/business/views/app_store.py on lines 60..75
      src/business/views/app_store.py on lines 87..102
      src/business/views/app_store.py on lines 105..120
      src/business/views/app_store.py on lines 150..165

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 123.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      File forms.py has 487 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      from __future__ import unicode_literals
      from django import forms
      from crispy_forms.helper import *
      from crispy_forms.layout import *
      from crispy_forms.bootstrap import *
      Severity: Minor
      Found in src/business/forms.py - About 7 hrs to fix

        Similar blocks of code found in 3 locations. Consider refactoring.
        Open

        class pfFileStatus(commonBusinessModel):
            name = CharField(_("Name"), max_length=255,
                             null=True, blank=True, default="")
            clean_name = CharField(_("Friendly Name"), max_length=255,
                                   null=True, blank=True, default="")
        Severity: Major
        Found in src/business/models.py and 2 other locations - About 7 hrs to fix
        src/business/models.py on lines 1635..1651
        src/business/models.py on lines 1654..1670

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 115.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 3 locations. Consider refactoring.
        Open

        class MimeType(commonBusinessModel):
            name = CharField(_("Name"), max_length=255,
                             null=True, blank=True, default="")
            clean_name = CharField(_("Friendly Name"), max_length=255,
                                   null=True, blank=True, default="")
        Severity: Major
        Found in src/business/models.py and 2 other locations - About 7 hrs to fix
        src/business/models.py on lines 1654..1670
        src/business/models.py on lines 1673..1689

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 115.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 3 locations. Consider refactoring.
        Open

        class pfFileType(commonBusinessModel):
            name = CharField(_("Name"), max_length=255,
                             null=True, blank=True, default="")
            clean_name = CharField(_("Friendly Name"), max_length=255,
                                   null=True, blank=True, default="")
        Severity: Major
        Found in src/business/models.py and 2 other locations - About 7 hrs to fix
        src/business/models.py on lines 1635..1651
        src/business/models.py on lines 1673..1689

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 115.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 4 locations. Consider refactoring.
        Open

        class appCreativeCollectionCreate(CreateView):
            model = bzCreativeCollection
            form_class = bzCreativeCollectionForm
            template_name = "business/object_form.html"
            success_url = reverse_lazy('business:app_creative_home')
        Severity: Major
        Found in src/business/views/app_creative.py and 3 other locations - About 7 hrs to fix
        src/business/views/app_creative.py on lines 72..86
        src/business/views/app_creative.py on lines 119..133
        src/business/views/app_creative.py on lines 166..180

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 112.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 4 locations. Consider refactoring.
        Open

        class appCreativeLayoutUpdate(UpdateView):
            model = bzCreativeLayout
            form_class = bzCreativeLayoutForm
            template_name = "business/object_form.html"
            success_url = reverse_lazy('business:app_creative_home')
        Severity: Major
        Found in src/business/views/app_creative.py and 3 other locations - About 7 hrs to fix
        src/business/views/app_creative.py on lines 55..69
        src/business/views/app_creative.py on lines 72..86
        src/business/views/app_creative.py on lines 119..133

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 112.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Severity
        Category
        Status
        Source
        Language