diff --git a/OpenOversight/app/models/database.py b/OpenOversight/app/models/database.py index d5678cb80..3154655e8 100644 --- a/OpenOversight/app/models/database.py +++ b/OpenOversight/app/models/database.py @@ -474,7 +474,7 @@ class Unit(BaseModel, TrackUpdates): ) def __repr__(self): - return f"Unit: {self.description}" + return f"" class Face(BaseModel, TrackUpdates): @@ -751,6 +751,9 @@ class Incident(BaseModel, TrackUpdates): "Department", backref=db.backref("incidents", cascade_backrefs=False), lazy=True ) + def __repr__(self): + return f"" + class User(UserMixin, BaseModel): __tablename__ = "users" diff --git a/OpenOversight/tests/test_models.py b/OpenOversight/tests/test_models.py index 8919ba4c1..884c1e2b6 100644 --- a/OpenOversight/tests/test_models.py +++ b/OpenOversight/tests/test_models.py @@ -141,6 +141,11 @@ def test_assignment_repr(mockdata): ) +def test_incident_repr(mockdata): + incident = Incident.query.first() + assert repr(incident) == f"" + + def test_job_repr(mockdata): job = Job.query.first() assert repr(job) == f"" @@ -158,7 +163,7 @@ def test_face_repr(mockdata): def test_unit_repr(mockdata): unit = Unit.query.first() - assert repr(unit) == f"Unit: {unit.description}" + assert repr(unit) == f"" def test_user_repr(mockdata): diff --git a/OpenOversight/tests/test_utils.py b/OpenOversight/tests/test_utils.py index 99bf113f0..b63a2803f 100644 --- a/OpenOversight/tests/test_utils.py +++ b/OpenOversight/tests/test_utils.py @@ -212,7 +212,7 @@ def test_user_cannot_submit_invalid_file_extension(mockdata): def test_unit_choices(mockdata): unit_choices_result = [str(x) for x in unit_choices()] - assert "Unit: Bureau of Organized Crime" in unit_choices_result + assert "" in unit_choices_result @upload_s3_patch