Skip to content

Commit

Permalink
Fixed lookup activity by meta. The identifier can be string or object…
Browse files Browse the repository at this point in the history
…, so passing what was received.
  • Loading branch information
karser committed Dec 19, 2022
1 parent e62ed9a commit 6ec7d4c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions girderformindlogger/external/fix_flankers.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@
activity['meta']['activity']['_id'] = "activity/{}".format(str(activityId)) #after import

Folder().setMetadata(folder=activity, metadata=activity['meta'])
protocolId = activity['meta']['protocolId']

user = User().findOne({'_id': activity['creatorId']})
# res = Activity().getFromUrl(activityUrl, 'activity', user, refreshCache=True, thread=False, meta={'identifier': activityId, 'protocolId': protocolId}) # comment out after first run
searchCriteria = {'identifier': activity['meta']['identifier'], 'protocolId': activity['meta']['protocolId']}
res = Activity().getFromUrl(activityUrl, 'activity', user, refreshCache=True, thread=False, meta=searchCriteria) # comment out after first run

jsonld_expander.formatLdObject(activity, 'activity', None, refreshCache=True, reimportFromUrl=False)

Expand Down

0 comments on commit 6ec7d4c

Please sign in to comment.