559Labs/django-dtg-store-manager

View on GitHub
src/business/api.py

Summary

Maintainability
F
4 days
Test Coverage

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

class bzProductVariantViewSet(viewsets.ModelViewSet):
    """ViewSet for the bzProductVariant class"""

    queryset = models.bzProductVariant.objects.all()
    serializer_class = serializers.bzProductVariantSerializer
Severity: Major
Found in src/business/api.py and 31 other locations - About 1 hr to fix
src/business/api.py on lines 6..11
src/business/api.py on lines 14..19
src/business/api.py on lines 22..27
src/business/api.py on lines 30..35
src/business/api.py on lines 38..43
src/business/api.py on lines 46..51
src/business/api.py on lines 62..67
src/business/api.py on lines 70..75
src/business/api.py on lines 78..83
src/business/api.py on lines 86..91
src/business/api.py on lines 94..99
src/business/api.py on lines 102..107
src/business/api.py on lines 110..115
src/business/api.py on lines 118..123
src/business/api.py on lines 126..131
src/business/api.py on lines 134..139
src/business/api.py on lines 142..147
src/business/api.py on lines 150..155
src/business/api.py on lines 158..163
src/business/api.py on lines 166..171
src/business/api.py on lines 174..179
src/business/api.py on lines 182..187
src/business/api.py on lines 190..195
src/business/api.py on lines 198..203
src/business/api.py on lines 206..211
src/business/api.py on lines 214..219
src/business/api.py on lines 222..227
src/business/api.py on lines 230..235
src/business/api.py on lines 238..243
src/business/api.py on lines 246..251
src/business/api.py on lines 254..259

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

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 32 locations. Consider refactoring.
Open

class bzCreativeDesignViewSet(viewsets.ModelViewSet):
    """ViewSet for the bzCreativeDesign class"""

    queryset = models.bzCreativeDesign.objects.all()
    serializer_class = serializers.bzCreativeDesignSerializer
Severity: Major
Found in src/business/api.py and 31 other locations - About 1 hr to fix
src/business/api.py on lines 6..11
src/business/api.py on lines 14..19
src/business/api.py on lines 30..35
src/business/api.py on lines 38..43
src/business/api.py on lines 46..51
src/business/api.py on lines 54..59
src/business/api.py on lines 62..67
src/business/api.py on lines 70..75
src/business/api.py on lines 78..83
src/business/api.py on lines 86..91
src/business/api.py on lines 94..99
src/business/api.py on lines 102..107
src/business/api.py on lines 110..115
src/business/api.py on lines 118..123
src/business/api.py on lines 126..131
src/business/api.py on lines 134..139
src/business/api.py on lines 142..147
src/business/api.py on lines 150..155
src/business/api.py on lines 158..163
src/business/api.py on lines 166..171
src/business/api.py on lines 174..179
src/business/api.py on lines 182..187
src/business/api.py on lines 190..195
src/business/api.py on lines 198..203
src/business/api.py on lines 206..211
src/business/api.py on lines 214..219
src/business/api.py on lines 222..227
src/business/api.py on lines 230..235
src/business/api.py on lines 238..243
src/business/api.py on lines 246..251
src/business/api.py on lines 254..259

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

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 32 locations. Consider refactoring.
Open

class wooAttributeViewSet(viewsets.ModelViewSet):
    """ViewSet for the wooAttribute class"""

    queryset = models.wooAttribute.objects.all()
    serializer_class = serializers.wooAttributeSerializer
Severity: Major
Found in src/business/api.py and 31 other locations - About 1 hr to fix
src/business/api.py on lines 6..11
src/business/api.py on lines 14..19
src/business/api.py on lines 22..27
src/business/api.py on lines 30..35
src/business/api.py on lines 38..43
src/business/api.py on lines 46..51
src/business/api.py on lines 54..59
src/business/api.py on lines 70..75
src/business/api.py on lines 78..83
src/business/api.py on lines 86..91
src/business/api.py on lines 94..99
src/business/api.py on lines 102..107
src/business/api.py on lines 110..115
src/business/api.py on lines 118..123
src/business/api.py on lines 126..131
src/business/api.py on lines 134..139
src/business/api.py on lines 142..147
src/business/api.py on lines 150..155
src/business/api.py on lines 158..163
src/business/api.py on lines 166..171
src/business/api.py on lines 174..179
src/business/api.py on lines 182..187
src/business/api.py on lines 190..195
src/business/api.py on lines 198..203
src/business/api.py on lines 206..211
src/business/api.py on lines 214..219
src/business/api.py on lines 222..227
src/business/api.py on lines 230..235
src/business/api.py on lines 238..243
src/business/api.py on lines 246..251
src/business/api.py on lines 254..259

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

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 32 locations. Consider refactoring.
Open

class bzBrandViewSet(viewsets.ModelViewSet):
    """ViewSet for the bzBrand class"""

    queryset = models.bzBrand.objects.all()
    serializer_class = serializers.bzBrandSerializer
Severity: Major
Found in src/business/api.py and 31 other locations - About 1 hr to fix
src/business/api.py on lines 14..19
src/business/api.py on lines 22..27
src/business/api.py on lines 30..35
src/business/api.py on lines 38..43
src/business/api.py on lines 46..51
src/business/api.py on lines 54..59
src/business/api.py on lines 62..67
src/business/api.py on lines 70..75
src/business/api.py on lines 78..83
src/business/api.py on lines 86..91
src/business/api.py on lines 94..99
src/business/api.py on lines 102..107
src/business/api.py on lines 110..115
src/business/api.py on lines 118..123
src/business/api.py on lines 126..131
src/business/api.py on lines 134..139
src/business/api.py on lines 142..147
src/business/api.py on lines 150..155
src/business/api.py on lines 158..163
src/business/api.py on lines 166..171
src/business/api.py on lines 174..179
src/business/api.py on lines 182..187
src/business/api.py on lines 190..195
src/business/api.py on lines 198..203
src/business/api.py on lines 206..211
src/business/api.py on lines 214..219
src/business/api.py on lines 222..227
src/business/api.py on lines 230..235
src/business/api.py on lines 238..243
src/business/api.py on lines 246..251
src/business/api.py on lines 254..259

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

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 32 locations. Consider refactoring.
Open

class bzCreativeCollectionViewSet(viewsets.ModelViewSet):
    """ViewSet for the bzCreativeCollection class"""

    queryset = models.bzCreativeCollection.objects.all()
    serializer_class = serializers.bzCreativeCollectionSerializer
Severity: Major
Found in src/business/api.py and 31 other locations - About 1 hr to fix
src/business/api.py on lines 6..11
src/business/api.py on lines 22..27
src/business/api.py on lines 30..35
src/business/api.py on lines 38..43
src/business/api.py on lines 46..51
src/business/api.py on lines 54..59
src/business/api.py on lines 62..67
src/business/api.py on lines 70..75
src/business/api.py on lines 78..83
src/business/api.py on lines 86..91
src/business/api.py on lines 94..99
src/business/api.py on lines 102..107
src/business/api.py on lines 110..115
src/business/api.py on lines 118..123
src/business/api.py on lines 126..131
src/business/api.py on lines 134..139
src/business/api.py on lines 142..147
src/business/api.py on lines 150..155
src/business/api.py on lines 158..163
src/business/api.py on lines 166..171
src/business/api.py on lines 174..179
src/business/api.py on lines 182..187
src/business/api.py on lines 190..195
src/business/api.py on lines 198..203
src/business/api.py on lines 206..211
src/business/api.py on lines 214..219
src/business/api.py on lines 222..227
src/business/api.py on lines 230..235
src/business/api.py on lines 238..243
src/business/api.py on lines 246..251
src/business/api.py on lines 254..259

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

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 32 locations. Consider refactoring.
Open

class bzCreativeRenderingViewSet(viewsets.ModelViewSet):
    """ViewSet for the bzCreativeRendering class"""

    queryset = models.bzCreativeRendering.objects.all()
    serializer_class = serializers.bzCreativeRenderingSerializer
Severity: Major
Found in src/business/api.py and 31 other locations - About 1 hr to fix
src/business/api.py on lines 6..11
src/business/api.py on lines 14..19
src/business/api.py on lines 22..27
src/business/api.py on lines 30..35
src/business/api.py on lines 46..51
src/business/api.py on lines 54..59
src/business/api.py on lines 62..67
src/business/api.py on lines 70..75
src/business/api.py on lines 78..83
src/business/api.py on lines 86..91
src/business/api.py on lines 94..99
src/business/api.py on lines 102..107
src/business/api.py on lines 110..115
src/business/api.py on lines 118..123
src/business/api.py on lines 126..131
src/business/api.py on lines 134..139
src/business/api.py on lines 142..147
src/business/api.py on lines 150..155
src/business/api.py on lines 158..163
src/business/api.py on lines 166..171
src/business/api.py on lines 174..179
src/business/api.py on lines 182..187
src/business/api.py on lines 190..195
src/business/api.py on lines 198..203
src/business/api.py on lines 206..211
src/business/api.py on lines 214..219
src/business/api.py on lines 222..227
src/business/api.py on lines 230..235
src/business/api.py on lines 238..243
src/business/api.py on lines 246..251
src/business/api.py on lines 254..259

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

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 32 locations. Consider refactoring.
Open

class bzCreativeLayoutViewSet(viewsets.ModelViewSet):
    """ViewSet for the bzCreativeLayout class"""

    queryset = models.bzCreativeLayout.objects.all()
    serializer_class = serializers.bzCreativeLayoutSerializer
Severity: Major
Found in src/business/api.py and 31 other locations - About 1 hr to fix
src/business/api.py on lines 6..11
src/business/api.py on lines 14..19
src/business/api.py on lines 22..27
src/business/api.py on lines 38..43
src/business/api.py on lines 46..51
src/business/api.py on lines 54..59
src/business/api.py on lines 62..67
src/business/api.py on lines 70..75
src/business/api.py on lines 78..83
src/business/api.py on lines 86..91
src/business/api.py on lines 94..99
src/business/api.py on lines 102..107
src/business/api.py on lines 110..115
src/business/api.py on lines 118..123
src/business/api.py on lines 126..131
src/business/api.py on lines 134..139
src/business/api.py on lines 142..147
src/business/api.py on lines 150..155
src/business/api.py on lines 158..163
src/business/api.py on lines 166..171
src/business/api.py on lines 174..179
src/business/api.py on lines 182..187
src/business/api.py on lines 190..195
src/business/api.py on lines 198..203
src/business/api.py on lines 206..211
src/business/api.py on lines 214..219
src/business/api.py on lines 222..227
src/business/api.py on lines 230..235
src/business/api.py on lines 238..243
src/business/api.py on lines 246..251
src/business/api.py on lines 254..259

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

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 32 locations. Consider refactoring.
Open

class bzProductViewSet(viewsets.ModelViewSet):
    """ViewSet for the bzProduct class"""

    queryset = models.bzProduct.objects.all()
    serializer_class = serializers.bzProductSerializer
Severity: Major
Found in src/business/api.py and 31 other locations - About 1 hr to fix
src/business/api.py on lines 6..11
src/business/api.py on lines 14..19
src/business/api.py on lines 22..27
src/business/api.py on lines 30..35
src/business/api.py on lines 38..43
src/business/api.py on lines 54..59
src/business/api.py on lines 62..67
src/business/api.py on lines 70..75
src/business/api.py on lines 78..83
src/business/api.py on lines 86..91
src/business/api.py on lines 94..99
src/business/api.py on lines 102..107
src/business/api.py on lines 110..115
src/business/api.py on lines 118..123
src/business/api.py on lines 126..131
src/business/api.py on lines 134..139
src/business/api.py on lines 142..147
src/business/api.py on lines 150..155
src/business/api.py on lines 158..163
src/business/api.py on lines 166..171
src/business/api.py on lines 174..179
src/business/api.py on lines 182..187
src/business/api.py on lines 190..195
src/business/api.py on lines 198..203
src/business/api.py on lines 206..211
src/business/api.py on lines 214..219
src/business/api.py on lines 222..227
src/business/api.py on lines 230..235
src/business/api.py on lines 238..243
src/business/api.py on lines 246..251
src/business/api.py on lines 254..259

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

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 32 locations. Consider refactoring.
Open

class pfSyncItemOptionViewSet(viewsets.ModelViewSet):
    """ViewSet for the pfSyncItemOption class"""

    queryset = models.pfSyncItemOption.objects.all()
    serializer_class = serializers.pfSyncItemOptionSerializer
Severity: Major
Found in src/business/api.py and 31 other locations - About 1 hr to fix
src/business/api.py on lines 6..11
src/business/api.py on lines 14..19
src/business/api.py on lines 22..27
src/business/api.py on lines 30..35
src/business/api.py on lines 38..43
src/business/api.py on lines 46..51
src/business/api.py on lines 54..59
src/business/api.py on lines 62..67
src/business/api.py on lines 70..75
src/business/api.py on lines 78..83
src/business/api.py on lines 86..91
src/business/api.py on lines 94..99
src/business/api.py on lines 102..107
src/business/api.py on lines 110..115
src/business/api.py on lines 118..123
src/business/api.py on lines 126..131
src/business/api.py on lines 134..139
src/business/api.py on lines 142..147
src/business/api.py on lines 150..155
src/business/api.py on lines 158..163
src/business/api.py on lines 166..171
src/business/api.py on lines 174..179
src/business/api.py on lines 190..195
src/business/api.py on lines 198..203
src/business/api.py on lines 206..211
src/business/api.py on lines 214..219
src/business/api.py on lines 222..227
src/business/api.py on lines 230..235
src/business/api.py on lines 238..243
src/business/api.py on lines 246..251
src/business/api.py on lines 254..259

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

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 32 locations. Consider refactoring.
Open

class pfCatalogColorViewSet(viewsets.ModelViewSet):
    """ViewSet for the pfCatalogColor class"""

    queryset = models.pfCatalogColor.objects.all()
    serializer_class = serializers.pfCatalogColorSerializer
Severity: Major
Found in src/business/api.py and 31 other locations - About 1 hr to fix
src/business/api.py on lines 6..11
src/business/api.py on lines 14..19
src/business/api.py on lines 22..27
src/business/api.py on lines 30..35
src/business/api.py on lines 38..43
src/business/api.py on lines 46..51
src/business/api.py on lines 54..59
src/business/api.py on lines 62..67
src/business/api.py on lines 70..75
src/business/api.py on lines 78..83
src/business/api.py on lines 86..91
src/business/api.py on lines 94..99
src/business/api.py on lines 102..107
src/business/api.py on lines 110..115
src/business/api.py on lines 118..123
src/business/api.py on lines 126..131
src/business/api.py on lines 134..139
src/business/api.py on lines 142..147
src/business/api.py on lines 150..155
src/business/api.py on lines 158..163
src/business/api.py on lines 166..171
src/business/api.py on lines 174..179
src/business/api.py on lines 182..187
src/business/api.py on lines 198..203
src/business/api.py on lines 206..211
src/business/api.py on lines 214..219
src/business/api.py on lines 222..227
src/business/api.py on lines 230..235
src/business/api.py on lines 238..243
src/business/api.py on lines 246..251
src/business/api.py on lines 254..259

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

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 32 locations. Consider refactoring.
Open

class pfPrintFileViewSet(viewsets.ModelViewSet):
    """ViewSet for the pfPrintFile class"""

    queryset = models.pfPrintFile.objects.all()
    serializer_class = serializers.pfPrintFileSerializer
Severity: Major
Found in src/business/api.py and 31 other locations - About 1 hr to fix
src/business/api.py on lines 6..11
src/business/api.py on lines 14..19
src/business/api.py on lines 22..27
src/business/api.py on lines 30..35
src/business/api.py on lines 38..43
src/business/api.py on lines 46..51
src/business/api.py on lines 54..59
src/business/api.py on lines 62..67
src/business/api.py on lines 70..75
src/business/api.py on lines 78..83
src/business/api.py on lines 86..91
src/business/api.py on lines 94..99
src/business/api.py on lines 102..107
src/business/api.py on lines 110..115
src/business/api.py on lines 118..123
src/business/api.py on lines 126..131
src/business/api.py on lines 134..139
src/business/api.py on lines 142..147
src/business/api.py on lines 150..155
src/business/api.py on lines 158..163
src/business/api.py on lines 166..171
src/business/api.py on lines 174..179
src/business/api.py on lines 182..187
src/business/api.py on lines 190..195
src/business/api.py on lines 198..203
src/business/api.py on lines 206..211
src/business/api.py on lines 214..219
src/business/api.py on lines 222..227
src/business/api.py on lines 230..235
src/business/api.py on lines 238..243
src/business/api.py on lines 246..251

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

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 32 locations. Consider refactoring.
Open

class wooShippingClassViewSet(viewsets.ModelViewSet):
    """ViewSet for the wooShippingClass class"""

    queryset = models.wooShippingClass.objects.all()
    serializer_class = serializers.wooShippingClassSerializer
Severity: Major
Found in src/business/api.py and 31 other locations - About 1 hr to fix
src/business/api.py on lines 6..11
src/business/api.py on lines 14..19
src/business/api.py on lines 22..27
src/business/api.py on lines 30..35
src/business/api.py on lines 38..43
src/business/api.py on lines 46..51
src/business/api.py on lines 54..59
src/business/api.py on lines 62..67
src/business/api.py on lines 70..75
src/business/api.py on lines 78..83
src/business/api.py on lines 86..91
src/business/api.py on lines 102..107
src/business/api.py on lines 110..115
src/business/api.py on lines 118..123
src/business/api.py on lines 126..131
src/business/api.py on lines 134..139
src/business/api.py on lines 142..147
src/business/api.py on lines 150..155
src/business/api.py on lines 158..163
src/business/api.py on lines 166..171
src/business/api.py on lines 174..179
src/business/api.py on lines 182..187
src/business/api.py on lines 190..195
src/business/api.py on lines 198..203
src/business/api.py on lines 206..211
src/business/api.py on lines 214..219
src/business/api.py on lines 222..227
src/business/api.py on lines 230..235
src/business/api.py on lines 238..243
src/business/api.py on lines 246..251
src/business/api.py on lines 254..259

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

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 32 locations. Consider refactoring.
Open

class pfSyncProductViewSet(viewsets.ModelViewSet):
    """ViewSet for the pfSyncProduct class"""

    queryset = models.pfSyncProduct.objects.all()
    serializer_class = serializers.pfSyncProductSerializer
Severity: Major
Found in src/business/api.py and 31 other locations - About 1 hr to fix
src/business/api.py on lines 6..11
src/business/api.py on lines 14..19
src/business/api.py on lines 22..27
src/business/api.py on lines 30..35
src/business/api.py on lines 38..43
src/business/api.py on lines 46..51
src/business/api.py on lines 54..59
src/business/api.py on lines 62..67
src/business/api.py on lines 70..75
src/business/api.py on lines 78..83
src/business/api.py on lines 86..91
src/business/api.py on lines 94..99
src/business/api.py on lines 102..107
src/business/api.py on lines 110..115
src/business/api.py on lines 118..123
src/business/api.py on lines 126..131
src/business/api.py on lines 134..139
src/business/api.py on lines 142..147
src/business/api.py on lines 150..155
src/business/api.py on lines 158..163
src/business/api.py on lines 174..179
src/business/api.py on lines 182..187
src/business/api.py on lines 190..195
src/business/api.py on lines 198..203
src/business/api.py on lines 206..211
src/business/api.py on lines 214..219
src/business/api.py on lines 222..227
src/business/api.py on lines 230..235
src/business/api.py on lines 238..243
src/business/api.py on lines 246..251
src/business/api.py on lines 254..259

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

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 32 locations. Consider refactoring.
Open

class pfSyncVariantViewSet(viewsets.ModelViewSet):
    """ViewSet for the pfSyncVariant class"""

    queryset = models.pfSyncVariant.objects.all()
    serializer_class = serializers.pfSyncVariantSerializer
Severity: Major
Found in src/business/api.py and 31 other locations - About 1 hr to fix
src/business/api.py on lines 6..11
src/business/api.py on lines 14..19
src/business/api.py on lines 22..27
src/business/api.py on lines 30..35
src/business/api.py on lines 38..43
src/business/api.py on lines 46..51
src/business/api.py on lines 54..59
src/business/api.py on lines 62..67
src/business/api.py on lines 70..75
src/business/api.py on lines 78..83
src/business/api.py on lines 86..91
src/business/api.py on lines 94..99
src/business/api.py on lines 102..107
src/business/api.py on lines 110..115
src/business/api.py on lines 118..123
src/business/api.py on lines 126..131
src/business/api.py on lines 134..139
src/business/api.py on lines 142..147
src/business/api.py on lines 150..155
src/business/api.py on lines 158..163
src/business/api.py on lines 166..171
src/business/api.py on lines 182..187
src/business/api.py on lines 190..195
src/business/api.py on lines 198..203
src/business/api.py on lines 206..211
src/business/api.py on lines 214..219
src/business/api.py on lines 222..227
src/business/api.py on lines 230..235
src/business/api.py on lines 238..243
src/business/api.py on lines 246..251
src/business/api.py on lines 254..259

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

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 32 locations. Consider refactoring.
Open

class wooCategoryViewSet(viewsets.ModelViewSet):
    """ViewSet for the wooCategory class"""

    queryset = models.wooCategory.objects.all()
    serializer_class = serializers.wooCategorySerializer
Severity: Major
Found in src/business/api.py and 31 other locations - About 1 hr to fix
src/business/api.py on lines 6..11
src/business/api.py on lines 14..19
src/business/api.py on lines 22..27
src/business/api.py on lines 30..35
src/business/api.py on lines 38..43
src/business/api.py on lines 46..51
src/business/api.py on lines 54..59
src/business/api.py on lines 62..67
src/business/api.py on lines 78..83
src/business/api.py on lines 86..91
src/business/api.py on lines 94..99
src/business/api.py on lines 102..107
src/business/api.py on lines 110..115
src/business/api.py on lines 118..123
src/business/api.py on lines 126..131
src/business/api.py on lines 134..139
src/business/api.py on lines 142..147
src/business/api.py on lines 150..155
src/business/api.py on lines 158..163
src/business/api.py on lines 166..171
src/business/api.py on lines 174..179
src/business/api.py on lines 182..187
src/business/api.py on lines 190..195
src/business/api.py on lines 198..203
src/business/api.py on lines 206..211
src/business/api.py on lines 214..219
src/business/api.py on lines 222..227
src/business/api.py on lines 230..235
src/business/api.py on lines 238..243
src/business/api.py on lines 246..251
src/business/api.py on lines 254..259

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

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 32 locations. Consider refactoring.
Open

class wooProductViewSet(viewsets.ModelViewSet):
    """ViewSet for the wooProduct class"""

    queryset = models.wooProduct.objects.all()
    serializer_class = serializers.wooProductSerializer
Severity: Major
Found in src/business/api.py and 31 other locations - About 1 hr to fix
src/business/api.py on lines 6..11
src/business/api.py on lines 14..19
src/business/api.py on lines 22..27
src/business/api.py on lines 30..35
src/business/api.py on lines 38..43
src/business/api.py on lines 46..51
src/business/api.py on lines 54..59
src/business/api.py on lines 62..67
src/business/api.py on lines 70..75
src/business/api.py on lines 78..83
src/business/api.py on lines 94..99
src/business/api.py on lines 102..107
src/business/api.py on lines 110..115
src/business/api.py on lines 118..123
src/business/api.py on lines 126..131
src/business/api.py on lines 134..139
src/business/api.py on lines 142..147
src/business/api.py on lines 150..155
src/business/api.py on lines 158..163
src/business/api.py on lines 166..171
src/business/api.py on lines 174..179
src/business/api.py on lines 182..187
src/business/api.py on lines 190..195
src/business/api.py on lines 198..203
src/business/api.py on lines 206..211
src/business/api.py on lines 214..219
src/business/api.py on lines 222..227
src/business/api.py on lines 230..235
src/business/api.py on lines 238..243
src/business/api.py on lines 246..251
src/business/api.py on lines 254..259

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

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 32 locations. Consider refactoring.
Open

class pfCatalogVariantViewSet(viewsets.ModelViewSet):
    """ViewSet for the pfCatalogVariant class"""

    queryset = models.pfCatalogVariant.objects.all()
    serializer_class = serializers.pfCatalogVariantSerializer
Severity: Major
Found in src/business/api.py and 31 other locations - About 1 hr to fix
src/business/api.py on lines 6..11
src/business/api.py on lines 14..19
src/business/api.py on lines 22..27
src/business/api.py on lines 30..35
src/business/api.py on lines 38..43
src/business/api.py on lines 46..51
src/business/api.py on lines 54..59
src/business/api.py on lines 62..67
src/business/api.py on lines 70..75
src/business/api.py on lines 78..83
src/business/api.py on lines 86..91
src/business/api.py on lines 94..99
src/business/api.py on lines 102..107
src/business/api.py on lines 110..115
src/business/api.py on lines 118..123
src/business/api.py on lines 126..131
src/business/api.py on lines 134..139
src/business/api.py on lines 142..147
src/business/api.py on lines 150..155
src/business/api.py on lines 158..163
src/business/api.py on lines 166..171
src/business/api.py on lines 174..179
src/business/api.py on lines 182..187
src/business/api.py on lines 190..195
src/business/api.py on lines 198..203
src/business/api.py on lines 206..211
src/business/api.py on lines 214..219
src/business/api.py on lines 222..227
src/business/api.py on lines 230..235
src/business/api.py on lines 246..251
src/business/api.py on lines 254..259

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

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 32 locations. Consider refactoring.
Open

class wooTagViewSet(viewsets.ModelViewSet):
    """ViewSet for the wooTag class"""

    queryset = models.wooTag.objects.all()
    serializer_class = serializers.wooTagSerializer
Severity: Major
Found in src/business/api.py and 31 other locations - About 1 hr to fix
src/business/api.py on lines 6..11
src/business/api.py on lines 14..19
src/business/api.py on lines 22..27
src/business/api.py on lines 30..35
src/business/api.py on lines 38..43
src/business/api.py on lines 46..51
src/business/api.py on lines 54..59
src/business/api.py on lines 62..67
src/business/api.py on lines 70..75
src/business/api.py on lines 78..83
src/business/api.py on lines 86..91
src/business/api.py on lines 94..99
src/business/api.py on lines 102..107
src/business/api.py on lines 118..123
src/business/api.py on lines 126..131
src/business/api.py on lines 134..139
src/business/api.py on lines 142..147
src/business/api.py on lines 150..155
src/business/api.py on lines 158..163
src/business/api.py on lines 166..171
src/business/api.py on lines 174..179
src/business/api.py on lines 182..187
src/business/api.py on lines 190..195
src/business/api.py on lines 198..203
src/business/api.py on lines 206..211
src/business/api.py on lines 214..219
src/business/api.py on lines 222..227
src/business/api.py on lines 230..235
src/business/api.py on lines 238..243
src/business/api.py on lines 246..251
src/business/api.py on lines 254..259

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

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 32 locations. Consider refactoring.
Open

class wooTermViewSet(viewsets.ModelViewSet):
    """ViewSet for the wooTerm class"""

    queryset = models.wooTerm.objects.all()
    serializer_class = serializers.wooTermSerializer
Severity: Major
Found in src/business/api.py and 31 other locations - About 1 hr to fix
src/business/api.py on lines 6..11
src/business/api.py on lines 14..19
src/business/api.py on lines 22..27
src/business/api.py on lines 30..35
src/business/api.py on lines 38..43
src/business/api.py on lines 46..51
src/business/api.py on lines 54..59
src/business/api.py on lines 62..67
src/business/api.py on lines 70..75
src/business/api.py on lines 78..83
src/business/api.py on lines 86..91
src/business/api.py on lines 94..99
src/business/api.py on lines 102..107
src/business/api.py on lines 110..115
src/business/api.py on lines 126..131
src/business/api.py on lines 134..139
src/business/api.py on lines 142..147
src/business/api.py on lines 150..155
src/business/api.py on lines 158..163
src/business/api.py on lines 166..171
src/business/api.py on lines 174..179
src/business/api.py on lines 182..187
src/business/api.py on lines 190..195
src/business/api.py on lines 198..203
src/business/api.py on lines 206..211
src/business/api.py on lines 214..219
src/business/api.py on lines 222..227
src/business/api.py on lines 230..235
src/business/api.py on lines 238..243
src/business/api.py on lines 246..251
src/business/api.py on lines 254..259

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

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 32 locations. Consider refactoring.
Open

class wooImageViewSet(viewsets.ModelViewSet):
    """ViewSet for the wooImage class"""

    queryset = models.wooImage.objects.all()
    serializer_class = serializers.wooImageSerializer
Severity: Major
Found in src/business/api.py and 31 other locations - About 1 hr to fix
src/business/api.py on lines 6..11
src/business/api.py on lines 14..19
src/business/api.py on lines 22..27
src/business/api.py on lines 30..35
src/business/api.py on lines 38..43
src/business/api.py on lines 46..51
src/business/api.py on lines 54..59
src/business/api.py on lines 62..67
src/business/api.py on lines 70..75
src/business/api.py on lines 86..91
src/business/api.py on lines 94..99
src/business/api.py on lines 102..107
src/business/api.py on lines 110..115
src/business/api.py on lines 118..123
src/business/api.py on lines 126..131
src/business/api.py on lines 134..139
src/business/api.py on lines 142..147
src/business/api.py on lines 150..155
src/business/api.py on lines 158..163
src/business/api.py on lines 166..171
src/business/api.py on lines 174..179
src/business/api.py on lines 182..187
src/business/api.py on lines 190..195
src/business/api.py on lines 198..203
src/business/api.py on lines 206..211
src/business/api.py on lines 214..219
src/business/api.py on lines 222..227
src/business/api.py on lines 230..235
src/business/api.py on lines 238..243
src/business/api.py on lines 246..251
src/business/api.py on lines 254..259

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

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 32 locations. Consider refactoring.
Open

class wooStoreViewSet(viewsets.ModelViewSet):
    """ViewSet for the wooStore class"""

    queryset = models.wooStore.objects.all()
    serializer_class = serializers.wooStoreSerializer
Severity: Major
Found in src/business/api.py and 31 other locations - About 1 hr to fix
src/business/api.py on lines 6..11
src/business/api.py on lines 14..19
src/business/api.py on lines 22..27
src/business/api.py on lines 30..35
src/business/api.py on lines 38..43
src/business/api.py on lines 46..51
src/business/api.py on lines 54..59
src/business/api.py on lines 62..67
src/business/api.py on lines 70..75
src/business/api.py on lines 78..83
src/business/api.py on lines 86..91
src/business/api.py on lines 94..99
src/business/api.py on lines 110..115
src/business/api.py on lines 118..123
src/business/api.py on lines 126..131
src/business/api.py on lines 134..139
src/business/api.py on lines 142..147
src/business/api.py on lines 150..155
src/business/api.py on lines 158..163
src/business/api.py on lines 166..171
src/business/api.py on lines 174..179
src/business/api.py on lines 182..187
src/business/api.py on lines 190..195
src/business/api.py on lines 198..203
src/business/api.py on lines 206..211
src/business/api.py on lines 214..219
src/business/api.py on lines 222..227
src/business/api.py on lines 230..235
src/business/api.py on lines 238..243
src/business/api.py on lines 246..251
src/business/api.py on lines 254..259

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

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 32 locations. Consider refactoring.
Open

class wpMediaSizeViewSet(viewsets.ModelViewSet):
    """ViewSet for the wpMediaSize class"""

    queryset = models.wpMediaSize.objects.all()
    serializer_class = serializers.wpMediaSizeSerializer
Severity: Major
Found in src/business/api.py and 31 other locations - About 1 hr to fix
src/business/api.py on lines 6..11
src/business/api.py on lines 14..19
src/business/api.py on lines 22..27
src/business/api.py on lines 30..35
src/business/api.py on lines 38..43
src/business/api.py on lines 46..51
src/business/api.py on lines 54..59
src/business/api.py on lines 62..67
src/business/api.py on lines 70..75
src/business/api.py on lines 78..83
src/business/api.py on lines 86..91
src/business/api.py on lines 94..99
src/business/api.py on lines 102..107
src/business/api.py on lines 110..115
src/business/api.py on lines 118..123
src/business/api.py on lines 126..131
src/business/api.py on lines 134..139
src/business/api.py on lines 150..155
src/business/api.py on lines 158..163
src/business/api.py on lines 166..171
src/business/api.py on lines 174..179
src/business/api.py on lines 182..187
src/business/api.py on lines 190..195
src/business/api.py on lines 198..203
src/business/api.py on lines 206..211
src/business/api.py on lines 214..219
src/business/api.py on lines 222..227
src/business/api.py on lines 230..235
src/business/api.py on lines 238..243
src/business/api.py on lines 246..251
src/business/api.py on lines 254..259

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

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 32 locations. Consider refactoring.
Open

class pfCountryViewSet(viewsets.ModelViewSet):
    """ViewSet for the pfCountry class"""

    queryset = models.pfCountry.objects.all()
    serializer_class = serializers.pfCountrySerializer
Severity: Major
Found in src/business/api.py and 31 other locations - About 1 hr to fix
src/business/api.py on lines 6..11
src/business/api.py on lines 14..19
src/business/api.py on lines 22..27
src/business/api.py on lines 30..35
src/business/api.py on lines 38..43
src/business/api.py on lines 46..51
src/business/api.py on lines 54..59
src/business/api.py on lines 62..67
src/business/api.py on lines 70..75
src/business/api.py on lines 78..83
src/business/api.py on lines 86..91
src/business/api.py on lines 94..99
src/business/api.py on lines 102..107
src/business/api.py on lines 110..115
src/business/api.py on lines 118..123
src/business/api.py on lines 126..131
src/business/api.py on lines 134..139
src/business/api.py on lines 142..147
src/business/api.py on lines 158..163
src/business/api.py on lines 166..171
src/business/api.py on lines 174..179
src/business/api.py on lines 182..187
src/business/api.py on lines 190..195
src/business/api.py on lines 198..203
src/business/api.py on lines 206..211
src/business/api.py on lines 214..219
src/business/api.py on lines 222..227
src/business/api.py on lines 230..235
src/business/api.py on lines 238..243
src/business/api.py on lines 246..251
src/business/api.py on lines 254..259

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

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 32 locations. Consider refactoring.
Open

class pfCatalogFileSpecViewSet(viewsets.ModelViewSet):
    """ViewSet for the pfCatalogFileSpec class"""

    queryset = models.pfCatalogFileSpec.objects.all()
    serializer_class = serializers.pfCatalogFileSpecSerializer
Severity: Major
Found in src/business/api.py and 31 other locations - About 1 hr to fix
src/business/api.py on lines 6..11
src/business/api.py on lines 14..19
src/business/api.py on lines 22..27
src/business/api.py on lines 30..35
src/business/api.py on lines 38..43
src/business/api.py on lines 46..51
src/business/api.py on lines 54..59
src/business/api.py on lines 62..67
src/business/api.py on lines 70..75
src/business/api.py on lines 78..83
src/business/api.py on lines 86..91
src/business/api.py on lines 94..99
src/business/api.py on lines 102..107
src/business/api.py on lines 110..115
src/business/api.py on lines 118..123
src/business/api.py on lines 126..131
src/business/api.py on lines 134..139
src/business/api.py on lines 142..147
src/business/api.py on lines 150..155
src/business/api.py on lines 158..163
src/business/api.py on lines 166..171
src/business/api.py on lines 174..179
src/business/api.py on lines 182..187
src/business/api.py on lines 190..195
src/business/api.py on lines 198..203
src/business/api.py on lines 214..219
src/business/api.py on lines 222..227
src/business/api.py on lines 230..235
src/business/api.py on lines 238..243
src/business/api.py on lines 246..251
src/business/api.py on lines 254..259

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

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 32 locations. Consider refactoring.
Open

class wpMediaViewSet(viewsets.ModelViewSet):
    """ViewSet for the wpMedia class"""

    queryset = models.wpMedia.objects.all()
    serializer_class = serializers.wpMediaSerializer
Severity: Major
Found in src/business/api.py and 31 other locations - About 1 hr to fix
src/business/api.py on lines 6..11
src/business/api.py on lines 14..19
src/business/api.py on lines 22..27
src/business/api.py on lines 30..35
src/business/api.py on lines 38..43
src/business/api.py on lines 46..51
src/business/api.py on lines 54..59
src/business/api.py on lines 62..67
src/business/api.py on lines 70..75
src/business/api.py on lines 78..83
src/business/api.py on lines 86..91
src/business/api.py on lines 94..99
src/business/api.py on lines 102..107
src/business/api.py on lines 110..115
src/business/api.py on lines 118..123
src/business/api.py on lines 126..131
src/business/api.py on lines 142..147
src/business/api.py on lines 150..155
src/business/api.py on lines 158..163
src/business/api.py on lines 166..171
src/business/api.py on lines 174..179
src/business/api.py on lines 182..187
src/business/api.py on lines 190..195
src/business/api.py on lines 198..203
src/business/api.py on lines 206..211
src/business/api.py on lines 214..219
src/business/api.py on lines 222..227
src/business/api.py on lines 230..235
src/business/api.py on lines 238..243
src/business/api.py on lines 246..251
src/business/api.py on lines 254..259

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

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 32 locations. Consider refactoring.
Open

class pfCatalogFileTypeViewSet(viewsets.ModelViewSet):
    """ViewSet for the pfCatalogFileType class"""

    queryset = models.pfCatalogFileType.objects.all()
    serializer_class = serializers.pfCatalogFileTypeSerializer
Severity: Major
Found in src/business/api.py and 31 other locations - About 1 hr to fix
src/business/api.py on lines 6..11
src/business/api.py on lines 14..19
src/business/api.py on lines 22..27
src/business/api.py on lines 30..35
src/business/api.py on lines 38..43
src/business/api.py on lines 46..51
src/business/api.py on lines 54..59
src/business/api.py on lines 62..67
src/business/api.py on lines 70..75
src/business/api.py on lines 78..83
src/business/api.py on lines 86..91
src/business/api.py on lines 94..99
src/business/api.py on lines 102..107
src/business/api.py on lines 110..115
src/business/api.py on lines 118..123
src/business/api.py on lines 126..131
src/business/api.py on lines 134..139
src/business/api.py on lines 142..147
src/business/api.py on lines 150..155
src/business/api.py on lines 158..163
src/business/api.py on lines 166..171
src/business/api.py on lines 174..179
src/business/api.py on lines 182..187
src/business/api.py on lines 190..195
src/business/api.py on lines 198..203
src/business/api.py on lines 206..211
src/business/api.py on lines 222..227
src/business/api.py on lines 230..235
src/business/api.py on lines 238..243
src/business/api.py on lines 246..251
src/business/api.py on lines 254..259

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

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 32 locations. Consider refactoring.
Open

class wooVariantViewSet(viewsets.ModelViewSet):
    """ViewSet for the wooVariant class"""

    queryset = models.wooVariant.objects.all()
    serializer_class = serializers.wooVariantSerializer
Severity: Major
Found in src/business/api.py and 31 other locations - About 1 hr to fix
src/business/api.py on lines 6..11
src/business/api.py on lines 14..19
src/business/api.py on lines 22..27
src/business/api.py on lines 30..35
src/business/api.py on lines 38..43
src/business/api.py on lines 46..51
src/business/api.py on lines 54..59
src/business/api.py on lines 62..67
src/business/api.py on lines 70..75
src/business/api.py on lines 78..83
src/business/api.py on lines 86..91
src/business/api.py on lines 94..99
src/business/api.py on lines 102..107
src/business/api.py on lines 110..115
src/business/api.py on lines 118..123
src/business/api.py on lines 134..139
src/business/api.py on lines 142..147
src/business/api.py on lines 150..155
src/business/api.py on lines 158..163
src/business/api.py on lines 166..171
src/business/api.py on lines 174..179
src/business/api.py on lines 182..187
src/business/api.py on lines 190..195
src/business/api.py on lines 198..203
src/business/api.py on lines 206..211
src/business/api.py on lines 214..219
src/business/api.py on lines 222..227
src/business/api.py on lines 230..235
src/business/api.py on lines 238..243
src/business/api.py on lines 246..251
src/business/api.py on lines 254..259

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

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 32 locations. Consider refactoring.
Open

class pfCatalogProductViewSet(viewsets.ModelViewSet):
    """ViewSet for the pfCatalogProduct class"""

    queryset = models.pfCatalogProduct.objects.all()
    serializer_class = serializers.pfCatalogProductSerializer
Severity: Major
Found in src/business/api.py and 31 other locations - About 1 hr to fix
src/business/api.py on lines 6..11
src/business/api.py on lines 14..19
src/business/api.py on lines 22..27
src/business/api.py on lines 30..35
src/business/api.py on lines 38..43
src/business/api.py on lines 46..51
src/business/api.py on lines 54..59
src/business/api.py on lines 62..67
src/business/api.py on lines 70..75
src/business/api.py on lines 78..83
src/business/api.py on lines 86..91
src/business/api.py on lines 94..99
src/business/api.py on lines 102..107
src/business/api.py on lines 110..115
src/business/api.py on lines 118..123
src/business/api.py on lines 126..131
src/business/api.py on lines 134..139
src/business/api.py on lines 142..147
src/business/api.py on lines 150..155
src/business/api.py on lines 158..163
src/business/api.py on lines 166..171
src/business/api.py on lines 174..179
src/business/api.py on lines 182..187
src/business/api.py on lines 190..195
src/business/api.py on lines 198..203
src/business/api.py on lines 206..211
src/business/api.py on lines 214..219
src/business/api.py on lines 222..227
src/business/api.py on lines 238..243
src/business/api.py on lines 246..251
src/business/api.py on lines 254..259

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

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 32 locations. Consider refactoring.
Open

class pfStoreViewSet(viewsets.ModelViewSet):
    """ViewSet for the pfStore class"""

    queryset = models.pfStore.objects.all()
    serializer_class = serializers.pfStoreSerializer
Severity: Major
Found in src/business/api.py and 31 other locations - About 1 hr to fix
src/business/api.py on lines 6..11
src/business/api.py on lines 14..19
src/business/api.py on lines 22..27
src/business/api.py on lines 30..35
src/business/api.py on lines 38..43
src/business/api.py on lines 46..51
src/business/api.py on lines 54..59
src/business/api.py on lines 62..67
src/business/api.py on lines 70..75
src/business/api.py on lines 78..83
src/business/api.py on lines 86..91
src/business/api.py on lines 94..99
src/business/api.py on lines 102..107
src/business/api.py on lines 110..115
src/business/api.py on lines 118..123
src/business/api.py on lines 126..131
src/business/api.py on lines 134..139
src/business/api.py on lines 142..147
src/business/api.py on lines 150..155
src/business/api.py on lines 158..163
src/business/api.py on lines 166..171
src/business/api.py on lines 174..179
src/business/api.py on lines 182..187
src/business/api.py on lines 190..195
src/business/api.py on lines 198..203
src/business/api.py on lines 206..211
src/business/api.py on lines 214..219
src/business/api.py on lines 222..227
src/business/api.py on lines 230..235
src/business/api.py on lines 238..243
src/business/api.py on lines 254..259

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

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 32 locations. Consider refactoring.
Open

class pfCatalogSizeViewSet(viewsets.ModelViewSet):
    """ViewSet for the pfCatalogSize class"""

    queryset = models.pfCatalogSize.objects.all()
    serializer_class = serializers.pfCatalogSizeSerializer
Severity: Major
Found in src/business/api.py and 31 other locations - About 1 hr to fix
src/business/api.py on lines 6..11
src/business/api.py on lines 14..19
src/business/api.py on lines 22..27
src/business/api.py on lines 30..35
src/business/api.py on lines 38..43
src/business/api.py on lines 46..51
src/business/api.py on lines 54..59
src/business/api.py on lines 62..67
src/business/api.py on lines 70..75
src/business/api.py on lines 78..83
src/business/api.py on lines 86..91
src/business/api.py on lines 94..99
src/business/api.py on lines 102..107
src/business/api.py on lines 110..115
src/business/api.py on lines 118..123
src/business/api.py on lines 126..131
src/business/api.py on lines 134..139
src/business/api.py on lines 142..147
src/business/api.py on lines 150..155
src/business/api.py on lines 158..163
src/business/api.py on lines 166..171
src/business/api.py on lines 174..179
src/business/api.py on lines 182..187
src/business/api.py on lines 190..195
src/business/api.py on lines 206..211
src/business/api.py on lines 214..219
src/business/api.py on lines 222..227
src/business/api.py on lines 230..235
src/business/api.py on lines 238..243
src/business/api.py on lines 246..251
src/business/api.py on lines 254..259

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

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 32 locations. Consider refactoring.
Open

class pfCatalogOptionTypeViewSet(viewsets.ModelViewSet):
    """ViewSet for the pfCatalogOptionType class"""

    queryset = models.pfCatalogOptionType.objects.all()
    serializer_class = serializers.pfCatalogOptionTypeSerializer
Severity: Major
Found in src/business/api.py and 31 other locations - About 1 hr to fix
src/business/api.py on lines 6..11
src/business/api.py on lines 14..19
src/business/api.py on lines 22..27
src/business/api.py on lines 30..35
src/business/api.py on lines 38..43
src/business/api.py on lines 46..51
src/business/api.py on lines 54..59
src/business/api.py on lines 62..67
src/business/api.py on lines 70..75
src/business/api.py on lines 78..83
src/business/api.py on lines 86..91
src/business/api.py on lines 94..99
src/business/api.py on lines 102..107
src/business/api.py on lines 110..115
src/business/api.py on lines 118..123
src/business/api.py on lines 126..131
src/business/api.py on lines 134..139
src/business/api.py on lines 142..147
src/business/api.py on lines 150..155
src/business/api.py on lines 158..163
src/business/api.py on lines 166..171
src/business/api.py on lines 174..179
src/business/api.py on lines 182..187
src/business/api.py on lines 190..195
src/business/api.py on lines 198..203
src/business/api.py on lines 206..211
src/business/api.py on lines 214..219
src/business/api.py on lines 230..235
src/business/api.py on lines 238..243
src/business/api.py on lines 246..251
src/business/api.py on lines 254..259

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

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 32 locations. Consider refactoring.
Open

class pfStateViewSet(viewsets.ModelViewSet):
    """ViewSet for the pfState class"""

    queryset = models.pfState.objects.all()
    serializer_class = serializers.pfStateSerializer
Severity: Major
Found in src/business/api.py and 31 other locations - About 1 hr to fix
src/business/api.py on lines 6..11
src/business/api.py on lines 14..19
src/business/api.py on lines 22..27
src/business/api.py on lines 30..35
src/business/api.py on lines 38..43
src/business/api.py on lines 46..51
src/business/api.py on lines 54..59
src/business/api.py on lines 62..67
src/business/api.py on lines 70..75
src/business/api.py on lines 78..83
src/business/api.py on lines 86..91
src/business/api.py on lines 94..99
src/business/api.py on lines 102..107
src/business/api.py on lines 110..115
src/business/api.py on lines 118..123
src/business/api.py on lines 126..131
src/business/api.py on lines 134..139
src/business/api.py on lines 142..147
src/business/api.py on lines 150..155
src/business/api.py on lines 166..171
src/business/api.py on lines 174..179
src/business/api.py on lines 182..187
src/business/api.py on lines 190..195
src/business/api.py on lines 198..203
src/business/api.py on lines 206..211
src/business/api.py on lines 214..219
src/business/api.py on lines 222..227
src/business/api.py on lines 230..235
src/business/api.py on lines 238..243
src/business/api.py on lines 246..251
src/business/api.py on lines 254..259

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

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

There are no issues that match your filters.

Category
Status