Skip to content

Commit 54c5649

Browse files
committed
Fix useranalytics API when there is no net time
1 parent 7d791ee commit 54c5649

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

django/applications/catmaid/control/useranalytics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ def get_useranalytics_data(request:HttpRequest, project_id) -> HttpResponse:
170170
data['write_events'] = raw_data['write_events'].tolist()
171171
data['write_timeaxis'] = raw_data['otherwrites_timeaxis']
172172
data['raw_write_events'] = raw_data['otherwrites_events']
173-
data['net_active_time'] = raw_data['net_active_time'].tolist()
173+
data['net_active_time'] = raw_data['net_active_time'].tolist() if len(raw_data['net_active_time']) else []
174174
data['netactivetime_timeaxis'] = raw_data['netactivetime_timeaxis']
175175
# data['active_bouts'] = raw_data['active_bouts'].tolist()
176176

0 commit comments

Comments
 (0)