Skip to content

Commit

Permalink
/add_datasource modified- backedn validate file function removed [dep…
Browse files Browse the repository at this point in the history
…loy]
  • Loading branch information
jayeshhireox committed Oct 7, 2024
1 parent 59694cc commit 3cf21ef
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions python/mdvtools/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,9 +283,10 @@ def add_or_update_image_datasource():
@project_bp.route("/add_datasource", methods=["POST"])
def add_datasource():
# we shouldn't be passing "backend" in request.form, the logic should only be on server
if backend:
response = add_datasource_backend(project)
return response
#if backend:
# print("$$$$")
# response = add_datasource_backend(project)
# return response

if (
"permission" not in project.state
Expand Down Expand Up @@ -405,7 +406,7 @@ def add_datasource_backend(project):
supplied_columns_only=supplied_only,
replace_data=replace,
)

print("$$$$$11111")
# database operations
file_set = [project.h5file, project.datasourcesfile]
if view:
Expand All @@ -431,6 +432,8 @@ def add_datasource_backend(project):
db.session.add(new_file)

db.session.commit()

print("$$$$2222")
return jsonify(
{
"message": f'File Validation Status: Success. Successfully added csv as a new datasource and files {file_set} have been modified under project "{name}"'
Expand Down

0 comments on commit 3cf21ef

Please sign in to comment.