Skip to content

Commit

Permalink
patches for dataset saving
Browse files Browse the repository at this point in the history
  • Loading branch information
brandomr committed Jul 15, 2024
1 parent 09ea724 commit 2bd1465
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/askem_beaker/contexts/dataset/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,11 +248,12 @@ async def save_dataset_request(self, message):
new_dataset["id"] = new_dataset_id

code = self.get_code(
"df_create_csv_dataset",
"hmi_create_csv_dataset",
{
"var_name": var_name,
"id": new_dataset_id,
"auth": self.get_auth(),
"username": self.auth.username,
"password": self.auth.password,
"filename": filename
}
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

# Make the HTTP PUT request to upload the file bytes
url = f'{hmi_server}/datasets/{id}/upload-csv'
response = requests.put(url, data=payload, files=files, auth={{auth}})
response = requests.put(url, data=payload, files=files, auth=("{{username}}", "{{password}}"))

# Check the response status code
if response.status_code < 300:
Expand Down

0 comments on commit 2bd1465

Please sign in to comment.