Contrast-Security-OSS/DjanGoat

View on GitHub

Showing 76 of 76 total issues

Function searchFunction has 36 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function searchFunction() {
    var input, filter, table, tr;
    input = document.getElementById("searchInput");
    filter = input.value;

Severity: Minor
Found in static/app/javascript/users/pay/index.js - About 1 hr to fix

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

        {
            "user_id": 3,
            "employee_contrib": "8000",
            "employer_contrib": "16000",
            "total": "30000",
    Severity: Major
    Found in app/management/commands/seed.py and 3 other locations - About 1 hr to fix
    app/management/commands/seed.py on lines 69..75
    app/management/commands/seed.py on lines 85..91
    app/management/commands/seed.py on lines 93..99

    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 43.

    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

        {
            "user_id": 2,
            "employee_contrib": "1000",
            "employer_contrib": "2000",
            "total": "4500",
    Severity: Major
    Found in app/management/commands/seed.py and 3 other locations - About 1 hr to fix
    app/management/commands/seed.py on lines 77..83
    app/management/commands/seed.py on lines 85..91
    app/management/commands/seed.py on lines 93..99

    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 43.

    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

        {
            "user_id": 5,
            "employee_contrib": "3000",
            "employer_contrib": "6000",
            "total": "12500",
    Severity: Major
    Found in app/management/commands/seed.py and 3 other locations - About 1 hr to fix
    app/management/commands/seed.py on lines 69..75
    app/management/commands/seed.py on lines 77..83
    app/management/commands/seed.py on lines 85..91

    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 43.

    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

        {
            "receiver_id": 4,
            "creator_id": 3,
            "message": 'Welcome to Railsgoat.',
            "read": False,
    Severity: Major
    Found in app/management/commands/seed.py and 3 other locations - About 1 hr to fix
    app/management/commands/seed.py on lines 292..298
    app/management/commands/seed.py on lines 300..306
    app/management/commands/seed.py on lines 316..322

    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 43.

    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 'email' in request.POST:
                email = request.POST['email']
            elif email is None:
                return HttpResponse("Error: no email inputted")
    Severity: Major
    Found in app/views/sessions/views.py and 1 other location - About 1 hr to fix
    app/views/sessions/views.py on lines 36..39

    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 43.

    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

        {
            "user_id": 4,
            "employee_contrib": "10000",
            "employer_contrib": "20000",
            "total": "40000",
    Severity: Major
    Found in app/management/commands/seed.py and 3 other locations - About 1 hr to fix
    app/management/commands/seed.py on lines 69..75
    app/management/commands/seed.py on lines 77..83
    app/management/commands/seed.py on lines 93..99

    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 43.

    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

        {
            "receiver_id": 2,
            "creator_id": 5,
            "message": 'Your benefits have been updated.',
            "read": False,
    Severity: Major
    Found in app/management/commands/seed.py and 3 other locations - About 1 hr to fix
    app/management/commands/seed.py on lines 300..306
    app/management/commands/seed.py on lines 308..314
    app/management/commands/seed.py on lines 316..322

    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 43.

    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 'password' in request.POST:
                password = request.POST['password']
            elif password is None:
                return HttpResponse("Error: no password inputted")
    Severity: Major
    Found in app/views/sessions/views.py and 1 other location - About 1 hr to fix
    app/views/sessions/views.py on lines 30..33

    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 43.

    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

        {
            "receiver_id": 5,
            "creator_id": 2,
            "message": 'Hello friend.',
            "read": False,
    Severity: Major
    Found in app/management/commands/seed.py and 3 other locations - About 1 hr to fix
    app/management/commands/seed.py on lines 292..298
    app/management/commands/seed.py on lines 300..306
    app/management/commands/seed.py on lines 308..314

    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 43.

    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

        {
            "receiver_id": 3,
            "creator_id": 4,
            "message": 'Please update your profile.',
            "read": False,
    Severity: Major
    Found in app/management/commands/seed.py and 3 other locations - About 1 hr to fix
    app/management/commands/seed.py on lines 292..298
    app/management/commands/seed.py on lines 308..314
    app/management/commands/seed.py on lines 316..322

    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 43.

    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

    Function drawChart has 28 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function drawChart() {
        // console.log(document.all)
    
        // Create the data table.
        var sick_days_taken = parseInt(document.getElementById('sick_days_taken').value);
    Severity: Minor
    Found in static/app/javascript/users/paid_time_off/paid_time_off.js - About 1 hr to fix

      Function index has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
      Open

      def index(request):
          if request.method == "POST":
              form = request.POST
              if not form:
                  return HttpResponse("Users index")
      Severity: Minor
      Found in app/views/users/views.py - About 1 hr to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

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

              migrations.AddField(
                  model_name='retirement',
                  name='user',
                  field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='retirements', to='app.User'),
      Severity: Major
      Found in app/migrations/0001_initial.py and 5 other locations - About 55 mins to fix
      app/migrations/0001_initial.py on lines 196..199
      app/migrations/0001_initial.py on lines 201..204
      app/migrations/0001_initial.py on lines 211..214
      app/migrations/0001_initial.py on lines 216..219
      app/migrations/0001_initial.py on lines 221..224

      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 37.

      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

              migrations.AddField(
                  model_name='message',
                  name='creator',
                  field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='created_messages', to='app.User'),
      Severity: Major
      Found in app/migrations/0001_initial.py and 5 other locations - About 55 mins to fix
      app/migrations/0001_initial.py on lines 191..194
      app/migrations/0001_initial.py on lines 196..199
      app/migrations/0001_initial.py on lines 201..204
      app/migrations/0001_initial.py on lines 211..214
      app/migrations/0001_initial.py on lines 221..224

      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 37.

      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

              migrations.AddField(
                  model_name='message',
                  name='receiver',
                  field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='received_messages', to='app.User'),
      Severity: Major
      Found in app/migrations/0001_initial.py and 5 other locations - About 55 mins to fix
      app/migrations/0001_initial.py on lines 191..194
      app/migrations/0001_initial.py on lines 196..199
      app/migrations/0001_initial.py on lines 201..204
      app/migrations/0001_initial.py on lines 211..214
      app/migrations/0001_initial.py on lines 216..219

      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 37.

      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

              migrations.AddField(
                  model_name='performance',
                  name='user',
                  field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='u_id', to='app.User'),
      Severity: Major
      Found in app/migrations/0001_initial.py and 5 other locations - About 55 mins to fix
      app/migrations/0001_initial.py on lines 191..194
      app/migrations/0001_initial.py on lines 196..199
      app/migrations/0001_initial.py on lines 211..214
      app/migrations/0001_initial.py on lines 216..219
      app/migrations/0001_initial.py on lines 221..224

      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 37.

      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

              migrations.AddField(
                  model_name='performance',
                  name='reviewer',
                  field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='r_id', to='app.User'),
      Severity: Major
      Found in app/migrations/0001_initial.py and 5 other locations - About 55 mins to fix
      app/migrations/0001_initial.py on lines 191..194
      app/migrations/0001_initial.py on lines 201..204
      app/migrations/0001_initial.py on lines 211..214
      app/migrations/0001_initial.py on lines 216..219
      app/migrations/0001_initial.py on lines 221..224

      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 37.

      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

      Severity: Major
      Found in app/views/dashboard/urls.py and 3 other locations - About 55 mins to fix
      app/views/api/mobile/urls.py on lines 0..7
      app/views/api/users/urls.py on lines 0..7
      app/views/users/messages/urls.py on lines 0..7

      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 37.

      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

              migrations.AddField(
                  model_name='paidtimeoff',
                  name='user',
                  field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='pto', to='app.User'),
      Severity: Major
      Found in app/migrations/0001_initial.py and 5 other locations - About 55 mins to fix
      app/migrations/0001_initial.py on lines 191..194
      app/migrations/0001_initial.py on lines 196..199
      app/migrations/0001_initial.py on lines 201..204
      app/migrations/0001_initial.py on lines 216..219
      app/migrations/0001_initial.py on lines 221..224

      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 37.

      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