Skip to content

Commit

Permalink
fix array fields of WEs such as startpages sometimes null instead of …
Browse files Browse the repository at this point in the history
…empty arrays (closes #423)
  • Loading branch information
boogheta committed Oct 21, 2021
1 parent 90b0fd8 commit 2cdda55
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion hyphe_backend/core.tac
Original file line number Diff line number Diff line change
Expand Up @@ -886,6 +886,8 @@ class Core(customJSONRPC):
uncategorized = list(set(s for st in starts.values() for s in st if s))
if save_startpages:
res = yield self.store.jsonrpc_add_webentity_startpages(WE["_id"], uncategorized, corpus=corpus)
if is_error(res):
logger.msg("WARNING: %s" % res['message'])
if not categories:
returnD(uncategorized)
returnD(starts)
Expand Down Expand Up @@ -2106,7 +2108,7 @@ class Memory_Structure(customJSONRPC):
if job['webentity_id']:
res = yield self.jsonrpc_add_webentity_startpages(job['webentity_id'], list(goodautostarts), corpus=corpus, _automatic=True)
if is_error(res):
print(res)
logger.msg("WARNING: %s" % res['message'])
logger.msg("...batch of %s crawled pages with %s links prepared..." % (len(batchpages), n_batchlinks), system="INFO - %s" % corpus)
s = time.time()

Expand Down

0 comments on commit 2cdda55

Please sign in to comment.