Skip to content

Commit

Permalink
Merge pull request #325 from fairdataihub/fix-manifest-bug
Browse files Browse the repository at this point in the history
fix:  Empty manifests causes manifest bug on fresh upload
  • Loading branch information
aaronm-2112 authored May 30, 2024
2 parents a7a5dbd + 61cb6ac commit 4259eea
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "soda-for-sparc",
"procductName": "SODA for SPARC",
"version": "15.0.0",
"version": "15.0.1-beta",
"description": "Keep Calm and Curate",
"main": "./out/main/index.js",
"author": "SODA Team",
Expand Down
12 changes: 10 additions & 2 deletions src/pyflask/curate/manifestSession/manifest_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,16 @@ def get_renaming_files_flow(self):
def df_mid_has_progress(self):
if self.ps is None:
self.ps = Pennsieve()
self.ps.manifest.sync(self.df_mid)
mfs = self.ps.list_manifests()
try:
self.ps.manifest.sync(self.df_mid)
except Exception as e:
return False

try:
mfs = self.ps.list_manifests()
except Exception as e:
# there are no manifests created yet
return False
return any(mf.id == self.df_mid and mf.status == "Initiated" for mf in mfs)

def get_remaining_file_count(self, mid, total_files):
Expand Down
2 changes: 1 addition & 1 deletion src/pyflask/startup/minimumApiVersion.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ def get_api_version():
Returns the version of the API
"""

return {'version': os.getenv('API_VERSION', "15.0.0")}
return {'version': os.getenv('API_VERSION', "15.0.1-beta")}

0 comments on commit 4259eea

Please sign in to comment.