Skip to content

Commit

Permalink
correct some bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
edouardbruelhart committed Apr 15, 2024
1 parent e3c0ced commit bc7c0fe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Binary file modified ms_sample_list_creator/main.exe
Binary file not shown.
6 changes: 5 additions & 1 deletion ms_sample_list_creator/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -911,6 +911,10 @@ def submit_result(self) -> None:
# Converts the CSV to a dataframe
df = pd.read_csv(str(file_path), skiprows=1)

# Keep only the necessary columns in order to not generate a corrupted CSV
columns_filter = ['File Name', 'Path', 'Instrument Method', 'Position', 'Inj Vol']
df = df.loc[:, columns_filter]

# Delete standby row
df = df.drop(df.index[-1])

Expand Down Expand Up @@ -955,7 +959,7 @@ def submit_result(self) -> None:
response = session.post(url=collection_url, headers=headers, data=records)

# Check if correctly added to directus
if response.status_code == 200:
if response.status_code != 200:
self.warning_label.config(text="Success!! Writing CSV...", foreground="green")
# Write data to the CSV file
with open(self.csv_path, "w", newline="") as csv_file:
Expand Down

0 comments on commit bc7c0fe

Please sign in to comment.