Skip to content

Commit

Permalink
removed group_observations
Browse files Browse the repository at this point in the history
  • Loading branch information
ayobi committed Jul 25, 2024
1 parent a8b002f commit 27491cf
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions microsetta_admin/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -578,20 +578,6 @@ def _check_sample_status(extended_barcode_info):
return warning


def group_observations(scans_info):
grouped_scans = {}
for scan in scans_info:
scan_id = scan['barcode_scan_id']
if scan_id not in grouped_scans:
grouped_scans[scan_id] = {
'scan_timestamp': scan['scan_timestamp'],
'sample_status': scan['sample_status'],
'technician_notes': scan['technician_notes'],
'observations': scan['observations']
}
return list(grouped_scans.values())


# Set up handlers for the cases,
# GET to view the page,
# POST to update info for a barcode -AND (possibly)-
Expand Down Expand Up @@ -627,14 +613,12 @@ def _scan_get(sample_barcode, update_error, observations):

events = event_result

scans_info = group_observations(result['scans_info'])

return render_template(
'scan.html',
**build_login_variables(),
barcode_info=result["barcode_info"],
projects_info=result['projects_info'],
scans_info=scans_info,
scans_info=result['scans_info'],
latest_status=latest_status,
dummy_status=DUMMY_SELECT_TEXT,
status_options=STATUS_OPTIONS,
Expand Down

0 comments on commit 27491cf

Please sign in to comment.