From 7f74a8ba75aa2bd9d7cc53a156fcc2efa188607a Mon Sep 17 00:00:00 2001 From: AdvaithRavishankar <83779786+AdvaithRavishankar@users.noreply.github.com> Date: Tue, 23 Jan 2024 12:13:31 -0800 Subject: [PATCH] Added minor debug fixes to CamerasTableModel --- sleap/gui/dataviews.py | 4 ++-- tests/gui/test_dataviews.py | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/sleap/gui/dataviews.py b/sleap/gui/dataviews.py index 2b12edf4f..e0391345e 100644 --- a/sleap/gui/dataviews.py +++ b/sleap/gui/dataviews.py @@ -664,10 +664,10 @@ class CamerasTableModel(GenericTableModel): and paired video """ - properties = ("camera, ""video") + properties = ("camera", "video") def object_to_items(self, obj: RecordingSession): - items = obj.cameras + items = obj.linked_cameras() return items def item_to_data(self, obj: RecordingSession, item: Camcorder): diff --git a/tests/gui/test_dataviews.py b/tests/gui/test_dataviews.py index 063dfe587..061d2e026 100644 --- a/tests/gui/test_dataviews.py +++ b/tests/gui/test_dataviews.py @@ -91,4 +91,8 @@ def test_camera_table(qtbot): is_sortable=True, name_prefix="", model=CamerasTableModel(), - ) \ No newline at end of file + ) + + assert table.columnCount() == 2 + + assert False \ No newline at end of file