559Labs/django-dtg-store-manager

View on GitHub

Showing 302 of 302 total issues

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

    TYPE_CHOICES = (
        (TYPE_TEXT, _("Basic Text")),
        (TYPE_COLORPICKER, _("Color Picker")),
        (TYPE_IMAGESELECT, _("Image Select")),
        (TYPE_TEXTLABEL, _("Text Label")),
Severity: Major
Found in src/business/models.py and 2 other locations - About 1 hr to fix
src/business/models.py on lines 582..586
src/business/models.py on lines 626..630

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

Severity
Category
Status
Source
Language