Showing 4,754 of 10,533 total issues

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

              <UncontrolledDropdown
                className="position-absolute text-sans-serif t-0 r-0 mt-card mr-card hover-actions"
                onClick={e => {
                  e.stopPropagation();
                }}
Severity: Major
Found in myems-web/src/components/kanban/TaskCard.js and 1 other location - About 4 hrs to fix
myems-web/src/components/kanban/KanbanColumnHeader.js on lines 10..21

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

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

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

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

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

Refactorings

Further Reading

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

      <CardBody className="fs--1">
        {loading ? (
          <Loader />
        ) : (
          isIterableArray(events) &&
Severity: Major
Found in myems-web/src/components/feed/FeedInterest.js and 1 other location - About 4 hrs to fix
myems-web/src/components/page/EventDetail.js on lines 155..166

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

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

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

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

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

Refactorings

Further Reading

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

      <UncontrolledDropdown className="text-sans-serif btn-reveal-trigger">
        <DropdownToggle color="reveal" size="sm" className="py-0 px-2">
          <FontAwesomeIcon icon="ellipsis-h" />
        </DropdownToggle>
        <DropdownMenu right className="py-0">
Severity: Major
Found in myems-web/src/components/kanban/KanbanColumnHeader.js and 1 other location - About 4 hrs to fix
myems-web/src/components/kanban/TaskCard.js on lines 110..126

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

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

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

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

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

Refactorings

Further Reading

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

          <CardBody className="fs--1">
            {loading ? (
              <Loader />
            ) : (
              isIterableArray(events) &&
Severity: Major
Found in myems-web/src/components/page/EventDetail.js and 1 other location - About 4 hrs to fix
myems-web/src/components/feed/FeedInterest.js on lines 20..31

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

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

        if 'rule_id' in new_values['data'].keys():
            if new_values['data']['rule_id'] <= 0:
                raise falcon.HTTPError(status=falcon.HTTP_400, title='API.BAD_REQUEST',
                                       description='API.INVALID_RULE_ID')
            rule_id = new_values['data']['rule_id']
Severity: Major
Found in myems-api/core/wechatmessage.py and 18 other locations - About 4 hrs to fix
myems-api/core/emailmessage.py on lines 116..122
myems-api/core/emailmessage.py on lines 316..322
myems-api/core/shopfloor.py on lines 115..121
myems-api/core/shopfloor.py on lines 123..129
myems-api/core/shopfloor.py on lines 371..377
myems-api/core/shopfloor.py on lines 379..385
myems-api/core/shopfloor.py on lines 2204..2210
myems-api/core/shopfloor.py on lines 2212..2218
myems-api/core/space.py on lines 131..137
myems-api/core/space.py on lines 166..172
myems-api/core/space.py on lines 174..180
myems-api/core/space.py on lines 547..553
myems-api/core/space.py on lines 3970..3976
myems-api/core/space.py on lines 4005..4011
myems-api/core/space.py on lines 4013..4019
myems-api/core/textmessage.py on lines 106..112
myems-api/core/textmessage.py on lines 291..297
myems-api/core/wechatmessage.py on lines 318..324

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

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

        if 'rule_id' in new_values['data'].keys():
            if new_values['data']['rule_id'] <= 0:
                raise falcon.HTTPError(status=falcon.HTTP_400, title='API.BAD_REQUEST',
                                       description='API.INVALID_RULE_ID')
            rule_id = new_values['data']['rule_id']
Severity: Major
Found in myems-api/core/wechatmessage.py and 18 other locations - About 4 hrs to fix
myems-api/core/emailmessage.py on lines 116..122
myems-api/core/emailmessage.py on lines 316..322
myems-api/core/shopfloor.py on lines 115..121
myems-api/core/shopfloor.py on lines 123..129
myems-api/core/shopfloor.py on lines 371..377
myems-api/core/shopfloor.py on lines 379..385
myems-api/core/shopfloor.py on lines 2204..2210
myems-api/core/shopfloor.py on lines 2212..2218
myems-api/core/space.py on lines 131..137
myems-api/core/space.py on lines 166..172
myems-api/core/space.py on lines 174..180
myems-api/core/space.py on lines 547..553
myems-api/core/space.py on lines 3970..3976
myems-api/core/space.py on lines 4005..4011
myems-api/core/space.py on lines 4013..4019
myems-api/core/textmessage.py on lines 106..112
myems-api/core/textmessage.py on lines 291..297
myems-api/core/wechatmessage.py on lines 110..116

Duplicated Code

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

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

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

Tuning

This issue has a mass of 84.

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

        if 'rule_id' in new_values['data'].keys():
            if new_values['data']['rule_id'] <= 0:
                raise falcon.HTTPError(status=falcon.HTTP_400, title='API.BAD_REQUEST',
                                       description='API.INVALID_RULE_ID')
            rule_id = new_values['data']['rule_id']
Severity: Major
Found in myems-api/core/textmessage.py and 18 other locations - About 4 hrs to fix
myems-api/core/emailmessage.py on lines 116..122
myems-api/core/emailmessage.py on lines 316..322
myems-api/core/shopfloor.py on lines 115..121
myems-api/core/shopfloor.py on lines 123..129
myems-api/core/shopfloor.py on lines 371..377
myems-api/core/shopfloor.py on lines 379..385
myems-api/core/shopfloor.py on lines 2204..2210
myems-api/core/shopfloor.py on lines 2212..2218
myems-api/core/space.py on lines 131..137
myems-api/core/space.py on lines 166..172
myems-api/core/space.py on lines 174..180
myems-api/core/space.py on lines 547..553
myems-api/core/space.py on lines 3970..3976
myems-api/core/space.py on lines 4005..4011
myems-api/core/space.py on lines 4013..4019
myems-api/core/textmessage.py on lines 291..297
myems-api/core/wechatmessage.py on lines 110..116
myems-api/core/wechatmessage.py on lines 318..324

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

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

        if 'cost_center_id' in new_values['data'].keys():
            if new_values['data']['cost_center_id'] <= 0:
                raise falcon.HTTPError(status=falcon.HTTP_400, title='API.BAD_REQUEST',
                                       description='API.INVALID_COST_CENTER_ID')
            cost_center_id = new_values['data']['cost_center_id']
Severity: Major
Found in myems-api/core/space.py and 18 other locations - About 4 hrs to fix
myems-api/core/emailmessage.py on lines 116..122
myems-api/core/emailmessage.py on lines 316..322
myems-api/core/shopfloor.py on lines 115..121
myems-api/core/shopfloor.py on lines 123..129
myems-api/core/shopfloor.py on lines 371..377
myems-api/core/shopfloor.py on lines 379..385
myems-api/core/shopfloor.py on lines 2204..2210
myems-api/core/shopfloor.py on lines 2212..2218
myems-api/core/space.py on lines 131..137
myems-api/core/space.py on lines 166..172
myems-api/core/space.py on lines 547..553
myems-api/core/space.py on lines 3970..3976
myems-api/core/space.py on lines 4005..4011
myems-api/core/space.py on lines 4013..4019
myems-api/core/textmessage.py on lines 106..112
myems-api/core/textmessage.py on lines 291..297
myems-api/core/wechatmessage.py on lines 110..116
myems-api/core/wechatmessage.py on lines 318..324

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

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

        if 'rule_id' in new_values['data'].keys():
            if new_values['data']['rule_id'] <= 0:
                raise falcon.HTTPError(status=falcon.HTTP_400, title='API.BAD_REQUEST',
                                       description='API.INVALID_RULE_ID')
            rule_id = new_values['data']['rule_id']
Severity: Major
Found in myems-api/core/emailmessage.py and 18 other locations - About 4 hrs to fix
myems-api/core/emailmessage.py on lines 316..322
myems-api/core/shopfloor.py on lines 115..121
myems-api/core/shopfloor.py on lines 123..129
myems-api/core/shopfloor.py on lines 371..377
myems-api/core/shopfloor.py on lines 379..385
myems-api/core/shopfloor.py on lines 2204..2210
myems-api/core/shopfloor.py on lines 2212..2218
myems-api/core/space.py on lines 131..137
myems-api/core/space.py on lines 166..172
myems-api/core/space.py on lines 174..180
myems-api/core/space.py on lines 547..553
myems-api/core/space.py on lines 3970..3976
myems-api/core/space.py on lines 4005..4011
myems-api/core/space.py on lines 4013..4019
myems-api/core/textmessage.py on lines 106..112
myems-api/core/textmessage.py on lines 291..297
myems-api/core/wechatmessage.py on lines 110..116
myems-api/core/wechatmessage.py on lines 318..324

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

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

        if 'rule_id' in new_values['data'].keys():
            if new_values['data']['rule_id'] <= 0:
                raise falcon.HTTPError(status=falcon.HTTP_400, title='API.BAD_REQUEST',
                                       description='API.INVALID_RULE_ID')
            rule_id = new_values['data']['rule_id']
Severity: Major
Found in myems-api/core/emailmessage.py and 18 other locations - About 4 hrs to fix
myems-api/core/emailmessage.py on lines 116..122
myems-api/core/shopfloor.py on lines 115..121
myems-api/core/shopfloor.py on lines 123..129
myems-api/core/shopfloor.py on lines 371..377
myems-api/core/shopfloor.py on lines 379..385
myems-api/core/shopfloor.py on lines 2204..2210
myems-api/core/shopfloor.py on lines 2212..2218
myems-api/core/space.py on lines 131..137
myems-api/core/space.py on lines 166..172
myems-api/core/space.py on lines 174..180
myems-api/core/space.py on lines 547..553
myems-api/core/space.py on lines 3970..3976
myems-api/core/space.py on lines 4005..4011
myems-api/core/space.py on lines 4013..4019
myems-api/core/textmessage.py on lines 106..112
myems-api/core/textmessage.py on lines 291..297
myems-api/core/wechatmessage.py on lines 110..116
myems-api/core/wechatmessage.py on lines 318..324

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

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

        if 'cost_center_id' in new_values['data'].keys():
            if new_values['data']['cost_center_id'] <= 0:
                raise falcon.HTTPError(status=falcon.HTTP_400, title='API.BAD_REQUEST',
                                       description='API.INVALID_COST_CENTER_ID')
            cost_center_id = new_values['data']['cost_center_id']
Severity: Major
Found in myems-api/core/shopfloor.py and 18 other locations - About 4 hrs to fix
myems-api/core/emailmessage.py on lines 116..122
myems-api/core/emailmessage.py on lines 316..322
myems-api/core/shopfloor.py on lines 115..121
myems-api/core/shopfloor.py on lines 371..377
myems-api/core/shopfloor.py on lines 379..385
myems-api/core/shopfloor.py on lines 2204..2210
myems-api/core/shopfloor.py on lines 2212..2218
myems-api/core/space.py on lines 131..137
myems-api/core/space.py on lines 166..172
myems-api/core/space.py on lines 174..180
myems-api/core/space.py on lines 547..553
myems-api/core/space.py on lines 3970..3976
myems-api/core/space.py on lines 4005..4011
myems-api/core/space.py on lines 4013..4019
myems-api/core/textmessage.py on lines 106..112
myems-api/core/textmessage.py on lines 291..297
myems-api/core/wechatmessage.py on lines 110..116
myems-api/core/wechatmessage.py on lines 318..324

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

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

        if 'contact_id' in new_values['data'].keys():
            if new_values['data']['contact_id'] <= 0:
                raise falcon.HTTPError(status=falcon.HTTP_400, title='API.BAD_REQUEST',
                                       description='API.INVALID_CONTACT_ID')
            contact_id = new_values['data']['contact_id']
Severity: Major
Found in myems-api/core/space.py and 18 other locations - About 4 hrs to fix
myems-api/core/emailmessage.py on lines 116..122
myems-api/core/emailmessage.py on lines 316..322
myems-api/core/shopfloor.py on lines 115..121
myems-api/core/shopfloor.py on lines 123..129
myems-api/core/shopfloor.py on lines 371..377
myems-api/core/shopfloor.py on lines 379..385
myems-api/core/shopfloor.py on lines 2204..2210
myems-api/core/shopfloor.py on lines 2212..2218
myems-api/core/space.py on lines 131..137
myems-api/core/space.py on lines 174..180
myems-api/core/space.py on lines 547..553
myems-api/core/space.py on lines 3970..3976
myems-api/core/space.py on lines 4005..4011
myems-api/core/space.py on lines 4013..4019
myems-api/core/textmessage.py on lines 106..112
myems-api/core/textmessage.py on lines 291..297
myems-api/core/wechatmessage.py on lines 110..116
myems-api/core/wechatmessage.py on lines 318..324

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

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

        if 'contact_id' in new_values['data'].keys():
            if new_values['data']['contact_id'] <= 0:
                raise falcon.HTTPError(status=falcon.HTTP_400, title='API.BAD_REQUEST',
                                       description='API.INVALID_CONTACT_ID')
            contact_id = new_values['data']['contact_id']
Severity: Major
Found in myems-api/core/shopfloor.py and 18 other locations - About 4 hrs to fix
myems-api/core/emailmessage.py on lines 116..122
myems-api/core/emailmessage.py on lines 316..322
myems-api/core/shopfloor.py on lines 115..121
myems-api/core/shopfloor.py on lines 123..129
myems-api/core/shopfloor.py on lines 379..385
myems-api/core/shopfloor.py on lines 2204..2210
myems-api/core/shopfloor.py on lines 2212..2218
myems-api/core/space.py on lines 131..137
myems-api/core/space.py on lines 166..172
myems-api/core/space.py on lines 174..180
myems-api/core/space.py on lines 547..553
myems-api/core/space.py on lines 3970..3976
myems-api/core/space.py on lines 4005..4011
myems-api/core/space.py on lines 4013..4019
myems-api/core/textmessage.py on lines 106..112
myems-api/core/textmessage.py on lines 291..297
myems-api/core/wechatmessage.py on lines 110..116
myems-api/core/wechatmessage.py on lines 318..324

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

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

        if 'id' in new_values['contact'].keys():
            if new_values['contact']['id'] <= 0:
                raise falcon.HTTPError(status=falcon.HTTP_400, title='API.BAD_REQUEST',
                                       description='API.INVALID_CONTACT_ID')
            contact_id = new_values['contact']['id']
Severity: Major
Found in myems-api/core/space.py and 18 other locations - About 4 hrs to fix
myems-api/core/emailmessage.py on lines 116..122
myems-api/core/emailmessage.py on lines 316..322
myems-api/core/shopfloor.py on lines 115..121
myems-api/core/shopfloor.py on lines 123..129
myems-api/core/shopfloor.py on lines 371..377
myems-api/core/shopfloor.py on lines 379..385
myems-api/core/shopfloor.py on lines 2204..2210
myems-api/core/shopfloor.py on lines 2212..2218
myems-api/core/space.py on lines 131..137
myems-api/core/space.py on lines 166..172
myems-api/core/space.py on lines 174..180
myems-api/core/space.py on lines 547..553
myems-api/core/space.py on lines 3970..3976
myems-api/core/space.py on lines 4013..4019
myems-api/core/textmessage.py on lines 106..112
myems-api/core/textmessage.py on lines 291..297
myems-api/core/wechatmessage.py on lines 110..116
myems-api/core/wechatmessage.py on lines 318..324

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

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

        if 'cost_center_id' in new_values['data'].keys():
            if new_values['data']['cost_center_id'] <= 0:
                raise falcon.HTTPError(status=falcon.HTTP_400, title='API.BAD_REQUEST',
                                       description='API.INVALID_COST_CENTER_ID')
            cost_center_id = new_values['data']['cost_center_id']
Severity: Major
Found in myems-api/core/shopfloor.py and 18 other locations - About 4 hrs to fix
myems-api/core/emailmessage.py on lines 116..122
myems-api/core/emailmessage.py on lines 316..322
myems-api/core/shopfloor.py on lines 115..121
myems-api/core/shopfloor.py on lines 123..129
myems-api/core/shopfloor.py on lines 371..377
myems-api/core/shopfloor.py on lines 2204..2210
myems-api/core/shopfloor.py on lines 2212..2218
myems-api/core/space.py on lines 131..137
myems-api/core/space.py on lines 166..172
myems-api/core/space.py on lines 174..180
myems-api/core/space.py on lines 547..553
myems-api/core/space.py on lines 3970..3976
myems-api/core/space.py on lines 4005..4011
myems-api/core/space.py on lines 4013..4019
myems-api/core/textmessage.py on lines 106..112
myems-api/core/textmessage.py on lines 291..297
myems-api/core/wechatmessage.py on lines 110..116
myems-api/core/wechatmessage.py on lines 318..324

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

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

        if 'contact_id' in new_values['data'].keys():
            if new_values['data']['contact_id'] <= 0:
                raise falcon.HTTPError(status=falcon.HTTP_400, title='API.BAD_REQUEST',
                                       description='API.INVALID_CONTACT_ID')
            contact_id = new_values['data']['contact_id']
Severity: Major
Found in myems-api/core/shopfloor.py and 18 other locations - About 4 hrs to fix
myems-api/core/emailmessage.py on lines 116..122
myems-api/core/emailmessage.py on lines 316..322
myems-api/core/shopfloor.py on lines 123..129
myems-api/core/shopfloor.py on lines 371..377
myems-api/core/shopfloor.py on lines 379..385
myems-api/core/shopfloor.py on lines 2204..2210
myems-api/core/shopfloor.py on lines 2212..2218
myems-api/core/space.py on lines 131..137
myems-api/core/space.py on lines 166..172
myems-api/core/space.py on lines 174..180
myems-api/core/space.py on lines 547..553
myems-api/core/space.py on lines 3970..3976
myems-api/core/space.py on lines 4005..4011
myems-api/core/space.py on lines 4013..4019
myems-api/core/textmessage.py on lines 106..112
myems-api/core/textmessage.py on lines 291..297
myems-api/core/wechatmessage.py on lines 110..116
myems-api/core/wechatmessage.py on lines 318..324

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

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

        if 'parent_space_id' in new_values['data'].keys():
            if new_values['data']['parent_space_id'] <= 0:
                raise falcon.HTTPError(status=falcon.HTTP_400, title='API.BAD_REQUEST',
                                       description='API.INVALID_PARENT_SPACE_ID')
            parent_space_id = new_values['data']['parent_space_id']
Severity: Major
Found in myems-api/core/space.py and 18 other locations - About 4 hrs to fix
myems-api/core/emailmessage.py on lines 116..122
myems-api/core/emailmessage.py on lines 316..322
myems-api/core/shopfloor.py on lines 115..121
myems-api/core/shopfloor.py on lines 123..129
myems-api/core/shopfloor.py on lines 371..377
myems-api/core/shopfloor.py on lines 379..385
myems-api/core/shopfloor.py on lines 2204..2210
myems-api/core/shopfloor.py on lines 2212..2218
myems-api/core/space.py on lines 166..172
myems-api/core/space.py on lines 174..180
myems-api/core/space.py on lines 547..553
myems-api/core/space.py on lines 3970..3976
myems-api/core/space.py on lines 4005..4011
myems-api/core/space.py on lines 4013..4019
myems-api/core/textmessage.py on lines 106..112
myems-api/core/textmessage.py on lines 291..297
myems-api/core/wechatmessage.py on lines 110..116
myems-api/core/wechatmessage.py on lines 318..324

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

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

        if 'id' in new_values['contact'].keys():
            if new_values['contact']['id'] <= 0:
                raise falcon.HTTPError(status=falcon.HTTP_400, title='API.BAD_REQUEST',
                                       description='API.INVALID_CONTACT_ID')
            contact_id = new_values['contact']['id']
Severity: Major
Found in myems-api/core/shopfloor.py and 18 other locations - About 4 hrs to fix
myems-api/core/emailmessage.py on lines 116..122
myems-api/core/emailmessage.py on lines 316..322
myems-api/core/shopfloor.py on lines 115..121
myems-api/core/shopfloor.py on lines 123..129
myems-api/core/shopfloor.py on lines 371..377
myems-api/core/shopfloor.py on lines 379..385
myems-api/core/shopfloor.py on lines 2212..2218
myems-api/core/space.py on lines 131..137
myems-api/core/space.py on lines 166..172
myems-api/core/space.py on lines 174..180
myems-api/core/space.py on lines 547..553
myems-api/core/space.py on lines 3970..3976
myems-api/core/space.py on lines 4005..4011
myems-api/core/space.py on lines 4013..4019
myems-api/core/textmessage.py on lines 106..112
myems-api/core/textmessage.py on lines 291..297
myems-api/core/wechatmessage.py on lines 110..116
myems-api/core/wechatmessage.py on lines 318..324

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

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

        if 'cost_center_id' in new_values['data'].keys():
            if new_values['data']['cost_center_id'] <= 0:
                raise falcon.HTTPError(status=falcon.HTTP_400, title='API.BAD_REQUEST',
                                       description='API.INVALID_COST_CENTER_ID')
            cost_center_id = new_values['data']['cost_center_id']
Severity: Major
Found in myems-api/core/space.py and 18 other locations - About 4 hrs to fix
myems-api/core/emailmessage.py on lines 116..122
myems-api/core/emailmessage.py on lines 316..322
myems-api/core/shopfloor.py on lines 115..121
myems-api/core/shopfloor.py on lines 123..129
myems-api/core/shopfloor.py on lines 371..377
myems-api/core/shopfloor.py on lines 379..385
myems-api/core/shopfloor.py on lines 2204..2210
myems-api/core/shopfloor.py on lines 2212..2218
myems-api/core/space.py on lines 131..137
myems-api/core/space.py on lines 166..172
myems-api/core/space.py on lines 174..180
myems-api/core/space.py on lines 3970..3976
myems-api/core/space.py on lines 4005..4011
myems-api/core/space.py on lines 4013..4019
myems-api/core/textmessage.py on lines 106..112
myems-api/core/textmessage.py on lines 291..297
myems-api/core/wechatmessage.py on lines 110..116
myems-api/core/wechatmessage.py on lines 318..324

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

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

        if 'id' in new_values['parent_space_id'].keys():
            if new_values['parent_space_id']['id'] <= 0:
                raise falcon.HTTPError(status=falcon.HTTP_400, title='API.BAD_REQUEST',
                                       description='API.INVALID_PARENT_SPACE_ID')
            parent_space_id = new_values['parent_space_id']['id']
Severity: Major
Found in myems-api/core/space.py and 18 other locations - About 4 hrs to fix
myems-api/core/emailmessage.py on lines 116..122
myems-api/core/emailmessage.py on lines 316..322
myems-api/core/shopfloor.py on lines 115..121
myems-api/core/shopfloor.py on lines 123..129
myems-api/core/shopfloor.py on lines 371..377
myems-api/core/shopfloor.py on lines 379..385
myems-api/core/shopfloor.py on lines 2204..2210
myems-api/core/shopfloor.py on lines 2212..2218
myems-api/core/space.py on lines 131..137
myems-api/core/space.py on lines 166..172
myems-api/core/space.py on lines 174..180
myems-api/core/space.py on lines 547..553
myems-api/core/space.py on lines 4005..4011
myems-api/core/space.py on lines 4013..4019
myems-api/core/textmessage.py on lines 106..112
myems-api/core/textmessage.py on lines 291..297
myems-api/core/wechatmessage.py on lines 110..116
myems-api/core/wechatmessage.py on lines 318..324

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

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