You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2023/07/25 17:06:51 UTC
[allura] branch master updated: set c.project during add_artifacts task, like c.app already has been
This is an automated email from the ASF dual-hosted git repository.
brondsem pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/allura.git
The following commit(s) were added to refs/heads/master by this push:
new 7791b8eb6 set c.project during add_artifacts task, like c.app already has been
7791b8eb6 is described below
commit 7791b8eb69fe65d43931af6c7f20511740dfbd1f
Author: Dave Brondsema <db...@slashdotmedia.com>
AuthorDate: Tue Jul 25 13:06:12 2023 -0400
set c.project during add_artifacts task, like c.app already has been
---
Allura/allura/tasks/index_tasks.py | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/Allura/allura/tasks/index_tasks.py b/Allura/allura/tasks/index_tasks.py
index 7d7128438..0ce2f7b28 100644
--- a/Allura/allura/tasks/index_tasks.py
+++ b/Allura/allura/tasks/index_tasks.py
@@ -105,8 +105,11 @@ def add_artifacts(ref_ids, update_solr=True, update_refs=True, solr_hosts=None):
artifact = ref.artifact
if artifact is None:
continue
- # c.app is normally set, so keep using it. During a reindex its not though, so set it from artifact
- with h.push_config(c, app=getattr(c, 'app', None) or artifact.app):
+ # c.project and .app are normally set, so keep using them
+ # During a reindex or other batch jobs, they are not though, so set it from artifact
+ app = getattr(c, 'app', None) or artifact.app
+ project = getattr(c, 'project', None) or artifact.project
+ with h.push_config(c, project=project, app=app):
s = artifact.solarize()
if s is None:
continue