Skip to content

Commit

Permalink
if object references to empty cache then refresh one
Browse files Browse the repository at this point in the history
  • Loading branch information
karser committed Nov 10, 2022
1 parent 755d2de commit 78e5fb4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions girderformindlogger/models/applet.py
Original file line number Diff line number Diff line change
Expand Up @@ -1924,6 +1924,9 @@ def getNextAppletData(self, activities, nextActivity, bufferSize):
activity,
'activity'
)
if not formattedActivity:
print('formattedActivity is empty. ActivityId=' + str(activity['_id']))
continue

buffer['activities'][activityIRI] = formattedActivity['activity']
buffer['items'].update(formattedActivity['items'])
Expand Down
7 changes: 6 additions & 1 deletion girderformindlogger/utility/jsonld_expander.py
Original file line number Diff line number Diff line change
Expand Up @@ -1666,7 +1666,12 @@ def formatLdObject(
oc is not None
]):
if mesoPrefix == 'item' or mesoPrefix == 'screen' or obj.get('meta', {}).get('schema', '') == APPLET_SCHEMA_VERSION:
return(loadCache(oc))
cached = loadCache(oc)
if cached is not None:
return cached
else:
refreshCache=True
reimportFromUrl=False
else:
return {}

Expand Down

0 comments on commit 78e5fb4

Please sign in to comment.