fossasia/open-event-orga-server

View on GitHub

Showing 1,194 of 1,194 total issues

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

def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint(None, 'microlocations', type_='foreignkey')
    op.drop_column('microlocations', 'video_stream_id')
    op.drop_table('video_streams')
Severity: Major
Found in migrations/versions/rev-2020-10-15-20:21:34-5e7082330d80_.py and 2 other locations - About 55 mins to fix
migrations/versions/010744bcdb8d_.py on lines 31..35
migrations/versions/acc80f4a90d2_.py on lines 40..44

Duplicated Code

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

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

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

Tuning

This issue has a mass of 37.

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

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

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

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

Refactorings

Further Reading

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

def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint(u'session_language_id_fkey', 'session', type_='foreignkey')
    op.drop_table('language')
    op.drop_column('session', 'language_id')
Severity: Minor
Found in migrations/versions/26a83ff1e6ad_.py and 1 other location - About 55 mins to fix
migrations/versions/c87273102cfb_.py on lines 18..22

Duplicated Code

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

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

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

Tuning

This issue has a mass of 37.

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

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

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

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

Refactorings

Further Reading

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

    sessions = Relationship(
        many=True,
        self_view='v1.exhibitor_session',
        self_view_kwargs={'id': '<id>'},
        related_view='v1.session_list',
Severity: Major
Found in app/api/schema/exhibitors.py and 8 other locations - About 55 mins to fix
app/api/schema/panel_permissions.py on lines 25..30
app/api/schema/sessions.py on lines 170..175
app/api/schema/sessions.py on lines 198..203
app/api/schema/users_groups_roles.py on lines 37..42
app/api/schema/video_stream.py on lines 53..58
app/api/schema/video_stream.py on lines 80..85
app/api/schema/video_stream.py on lines 89..94
app/api/schema/video_stream_moderators.py on lines 26..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 37.

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

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

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

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

Refactorings

Further Reading

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

def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint(None, 'orders', type_='foreignkey')
    op.drop_column(u'orders', 'discount_code_id')
    op.drop_table('discount_codes')
Severity: Major
Found in migrations/versions/acc80f4a90d2_.py and 2 other locations - About 55 mins to fix
migrations/versions/010744bcdb8d_.py on lines 31..35
migrations/versions/rev-2020-10-15-20:21:34-5e7082330d80_.py on lines 34..38

Duplicated Code

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

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

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

Tuning

This issue has a mass of 37.

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

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

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

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

Refactorings

Further Reading

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

    user = Relationship(
        dumps_only=True,
        self_view='v1.video_stream_moderator_user',
        self_view_kwargs={'id': '<id>'},
        related_view='v1.user_detail',
Severity: Major
Found in app/api/schema/video_stream_moderators.py and 8 other locations - About 55 mins to fix
app/api/schema/exhibitors.py on lines 53..58
app/api/schema/panel_permissions.py on lines 25..30
app/api/schema/sessions.py on lines 170..175
app/api/schema/sessions.py on lines 198..203
app/api/schema/users_groups_roles.py on lines 37..42
app/api/schema/video_stream.py on lines 53..58
app/api/schema/video_stream.py on lines 80..85
app/api/schema/video_stream.py on lines 89..94

Duplicated Code

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

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

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

Tuning

This issue has a mass of 37.

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

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

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

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

Refactorings

Further Reading

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

def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint(u'session_level_id_fkey', 'session', type_='foreignkey')
    op.drop_table('level')
    op.drop_column('session', 'level_id')
Severity: Minor
Found in migrations/versions/c87273102cfb_.py and 1 other location - About 55 mins to fix
migrations/versions/26a83ff1e6ad_.py on lines 18..22

Duplicated Code

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

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

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

Tuning

This issue has a mass of 37.

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

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

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

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

Refactorings

Further Reading

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

def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint(u'ticket_holders_tag_id_fkey', 'ticket_holders', type_='foreignkey')
    op.drop_column('ticket_holders', 'tag_id')
    op.drop_table('tags')
Severity: Minor
Found in migrations/versions/rev-2023-08-11-15:26:07-1af4cc4f7cd5_.py and 1 other location - About 55 mins to fix
migrations/versions/rev-2020-12-10-05:14:25-295e44c2202b_.py on lines 37..41

Duplicated Code

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

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

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

Tuning

This issue has a mass of 37.

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

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

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

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

Refactorings

Further Reading

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

def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint('video_streams_channel_id_fkey', 'video_streams', type_='foreignkey')
    op.drop_column('video_streams', 'channel_id')
    op.drop_table('video_channels')
Severity: Minor
Found in migrations/versions/rev-2020-12-10-05:14:25-295e44c2202b_.py and 1 other location - About 55 mins to fix
migrations/versions/rev-2023-08-11-15:26:07-1af4cc4f7cd5_.py on lines 35..39

Duplicated Code

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

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

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

Tuning

This issue has a mass of 37.

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

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

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

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

Refactorings

Further Reading

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

def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint(None, 'faq', type_='foreignkey')
    op.drop_column('faq', 'faq_type_id')
    op.drop_table('faq_types')
Severity: Major
Found in migrations/versions/010744bcdb8d_.py and 2 other locations - About 55 mins to fix
migrations/versions/acc80f4a90d2_.py on lines 40..44
migrations/versions/rev-2020-10-15-20:21:34-5e7082330d80_.py on lines 34..38

Duplicated Code

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

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

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

Tuning

This issue has a mass of 37.

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

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

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

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

Refactorings

Further Reading

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

    if type(data) is dict:
        data = OrderedDict(sorted(list(data.items()), key=lambda t: t[0]))
Severity: Minor
Found in app/api/helpers/export_helpers.py and 1 other location - About 55 mins to fix
app/api/helpers/export_helpers.py on lines 162..162

Duplicated Code

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

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

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

Tuning

This issue has a mass of 37.

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

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

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

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

Refactorings

Further Reading

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

    speaker_invites = Relationship(
        self_view='v1.event_speaker_invites',
        self_view_kwargs={'id': '<id>'},
        related_view='v1.speaker_invite_list',
        related_view_kwargs={'event_id': '<id>'},
Severity: Major
Found in app/api/schema/events.py and 15 other locations - About 55 mins to fix
app/api/schema/attendees.py on lines 89..93
app/api/schema/attendees.py on lines 98..102
app/api/schema/attendees.py on lines 107..111
app/api/schema/attendees.py on lines 141..145
app/api/schema/events.py on lines 388..392
app/api/schema/events.py on lines 476..480
app/api/schema/events.py on lines 511..515
app/api/schema/groups.py on lines 62..66
app/api/schema/orders.py on lines 145..149
app/api/schema/orders.py on lines 166..170
app/api/schema/orders.py on lines 176..180
app/api/schema/speakers.py on lines 74..78
app/api/schema/user_check_in.py on lines 25..29
app/api/schema/user_check_in.py on lines 34..38
app/api/schema/user_check_in.py on lines 43..47

Duplicated Code

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

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

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

Tuning

This issue has a mass of 37.

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

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

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

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

Refactorings

Further Reading

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

    roles = Relationship(
        self_view='v1.event_users_groups_roles',
        self_view_kwargs={'id': '<id>'},
        related_view='v1.users_groups_roles_list',
        related_view_kwargs={'group_id': '<id>'},
Severity: Major
Found in app/api/schema/groups.py and 15 other locations - About 55 mins to fix
app/api/schema/attendees.py on lines 89..93
app/api/schema/attendees.py on lines 98..102
app/api/schema/attendees.py on lines 107..111
app/api/schema/attendees.py on lines 141..145
app/api/schema/events.py on lines 379..383
app/api/schema/events.py on lines 388..392
app/api/schema/events.py on lines 476..480
app/api/schema/events.py on lines 511..515
app/api/schema/orders.py on lines 145..149
app/api/schema/orders.py on lines 166..170
app/api/schema/orders.py on lines 176..180
app/api/schema/speakers.py on lines 74..78
app/api/schema/user_check_in.py on lines 25..29
app/api/schema/user_check_in.py on lines 34..38
app/api/schema/user_check_in.py on lines 43..47

Duplicated Code

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

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

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

Tuning

This issue has a mass of 37.

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

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

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

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

Refactorings

Further Reading

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

    rooms = Relationship(
        many=True,
        self_view='v1.video_stream_rooms',
        self_view_kwargs={'id': '<id>'},
        related_view='v1.microlocation_list',
Severity: Major
Found in app/api/schema/video_stream.py and 8 other locations - About 55 mins to fix
app/api/schema/exhibitors.py on lines 53..58
app/api/schema/panel_permissions.py on lines 25..30
app/api/schema/sessions.py on lines 170..175
app/api/schema/sessions.py on lines 198..203
app/api/schema/users_groups_roles.py on lines 37..42
app/api/schema/video_stream.py on lines 80..85
app/api/schema/video_stream.py on lines 89..94
app/api/schema/video_stream_moderators.py on lines 26..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 37.

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

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

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

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

Refactorings

Further Reading

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

    data = OrderedDict(sorted(list(data.items()), key=lambda t: t[0]))
Severity: Minor
Found in app/api/helpers/export_helpers.py and 1 other location - About 55 mins to fix
app/api/helpers/export_helpers.py on lines 133..134

Duplicated Code

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

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

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

Tuning

This issue has a mass of 37.

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

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

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

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

Refactorings

Further Reading

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

    events = Relationship(
        self_view='v1.group_events',
        self_view_kwargs={'id': '<id>'},
        related_view='v1.event_list',
        related_view_kwargs={'group_id': '<id>'},
Severity: Minor
Found in app/api/schema/groups.py and 1 other location - About 55 mins to fix
app/api/schema/event_topics.py on lines 37..41

Duplicated Code

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

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

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

Tuning

This issue has a mass of 37.

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

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

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

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

Refactorings

Further Reading

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

    roles = Relationship(
        self_view='v1.event_users_events_roles',
        self_view_kwargs={'id': '<id>'},
        related_view='v1.users_events_roles_list',
        related_view_kwargs={'event_id': '<id>'},
Severity: Major
Found in app/api/schema/events.py and 15 other locations - About 55 mins to fix
app/api/schema/attendees.py on lines 89..93
app/api/schema/attendees.py on lines 98..102
app/api/schema/attendees.py on lines 107..111
app/api/schema/attendees.py on lines 141..145
app/api/schema/events.py on lines 379..383
app/api/schema/events.py on lines 388..392
app/api/schema/events.py on lines 476..480
app/api/schema/groups.py on lines 62..66
app/api/schema/orders.py on lines 145..149
app/api/schema/orders.py on lines 166..170
app/api/schema/orders.py on lines 176..180
app/api/schema/speakers.py on lines 74..78
app/api/schema/user_check_in.py on lines 25..29
app/api/schema/user_check_in.py on lines 34..38
app/api/schema/user_check_in.py on lines 43..47

Duplicated Code

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

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

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

Tuning

This issue has a mass of 37.

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

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

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

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

Refactorings

Further Reading

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

    marketer = Relationship(
        self_view='v1.order_marketer',
        self_view_kwargs={'order_identifier': '<identifier>'},
        related_view='v1.user_detail',
        related_view_kwargs={'id': '<marketer_id>'},
Severity: Major
Found in app/api/schema/orders.py and 15 other locations - About 55 mins to fix
app/api/schema/attendees.py on lines 89..93
app/api/schema/attendees.py on lines 98..102
app/api/schema/attendees.py on lines 107..111
app/api/schema/attendees.py on lines 141..145
app/api/schema/events.py on lines 379..383
app/api/schema/events.py on lines 388..392
app/api/schema/events.py on lines 476..480
app/api/schema/events.py on lines 511..515
app/api/schema/groups.py on lines 62..66
app/api/schema/orders.py on lines 145..149
app/api/schema/orders.py on lines 176..180
app/api/schema/speakers.py on lines 74..78
app/api/schema/user_check_in.py on lines 25..29
app/api/schema/user_check_in.py on lines 34..38
app/api/schema/user_check_in.py on lines 43..47

Duplicated Code

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

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

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

Tuning

This issue has a mass of 37.

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

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

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

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

Refactorings

Further Reading

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

    video_recordings = Relationship(
        many=True,
        self_view='v1.video_stream_recordings',
        self_view_kwargs={'id': '<id>'},
        related_view='v1.video_recording_list',
Severity: Major
Found in app/api/schema/video_stream.py and 8 other locations - About 55 mins to fix
app/api/schema/exhibitors.py on lines 53..58
app/api/schema/panel_permissions.py on lines 25..30
app/api/schema/sessions.py on lines 170..175
app/api/schema/sessions.py on lines 198..203
app/api/schema/users_groups_roles.py on lines 37..42
app/api/schema/video_stream.py on lines 53..58
app/api/schema/video_stream.py on lines 89..94
app/api/schema/video_stream_moderators.py on lines 26..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 37.

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

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

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

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

Refactorings

Further Reading

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

    moderators = Relationship(
        many=True,
        self_view='v1.video_stream_moderators',
        self_view_kwargs={'id': '<id>'},
        related_view='v1.video_stream_moderator_list',
Severity: Major
Found in app/api/schema/video_stream.py and 8 other locations - About 55 mins to fix
app/api/schema/exhibitors.py on lines 53..58
app/api/schema/panel_permissions.py on lines 25..30
app/api/schema/sessions.py on lines 170..175
app/api/schema/sessions.py on lines 198..203
app/api/schema/users_groups_roles.py on lines 37..42
app/api/schema/video_stream.py on lines 53..58
app/api/schema/video_stream.py on lines 80..85
app/api/schema/video_stream_moderators.py on lines 26..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 37.

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

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

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

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

Refactorings

Further Reading

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

    speakers = Relationship(
        many=True,
        self_view='v1.session_speaker',
        self_view_kwargs={'id': '<id>'},
        related_view='v1.speaker_list',
Severity: Major
Found in app/api/schema/sessions.py and 8 other locations - About 55 mins to fix
app/api/schema/exhibitors.py on lines 53..58
app/api/schema/panel_permissions.py on lines 25..30
app/api/schema/sessions.py on lines 198..203
app/api/schema/users_groups_roles.py on lines 37..42
app/api/schema/video_stream.py on lines 53..58
app/api/schema/video_stream.py on lines 80..85
app/api/schema/video_stream.py on lines 89..94
app/api/schema/video_stream_moderators.py on lines 26..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 37.

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

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

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

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

Refactorings

Further Reading

Severity
Category
Status
Source
Language