Skip to content

Copy-pasted methods across admin/serializer classes #1801

Description

@abkfenris

test_timeseries is duplicated verbatim in TimeSeriesAdmin (admin.py:109) and TimeSeriesInline (:174); get_location_point is duplicated in PlatformSerializer (serializers.py:89) and PlatformPartialSerializer (:151). A small mixin each.

Also in admin.py: the module-level timeseries_status (:202-289) has two near-identical title joins and three near-identical format_html blocks differing only in colour and label — a (colour, label, count) tuple plus one format_html would cut it to a third.

(from #1780)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions