Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tentatively fixes #431 #467

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions labcontrol/db/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -3505,6 +3505,19 @@ def generate_prep_information(self):
'',
result['orig_name2'])

# Currently, controls rows also have empty entries in the
# 'Project_name' column. Test to see if 'project_name' is
# None, and if so, populate w/data from the 'sample_plate'
# column.
if result['project_name'] is None:
# copy the value from 'sample_plate' and remove any
# trailing '_Plate_N', ' plate N', or other
# variations on the two suffixes.
s = re.sub("(_| )(P|p)late(_| )\d+",
'',
result['sample_plate'])
result['project_name'] = s

if sid is not None and study_id is not None:
curr_prep_sheet_id = study_id
else:
Expand Down
2 changes: 1 addition & 1 deletion labcontrol/db/tests/test_process.py

Large diffs are not rendered by default.