This is an automated email from the ASF dual-hosted git repository.
gcruz 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 eec31c3d4 SF-8069 Add a helper method to TroveCategory to find by
fullpath(s)
eec31c3d4 is described below
commit eec31c3d48ec47daa61fd62b537a975eaac4951f
Author: Kenton Taylor <[email protected]>
AuthorDate: Tue Jan 31 14:31:37 2023 +0000
SF-8069 Add a helper method to TroveCategory to find by fullpath(s)
---
Allura/allura/model/project.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/Allura/allura/model/project.py b/Allura/allura/model/project.py
index 24cd3b470..e6ff5af2e 100644
--- a/Allura/allura/model/project.py
+++ b/Allura/allura/model/project.py
@@ -179,6 +179,10 @@ class TroveCategory(MappedClass):
def by_trove_cat_ids(cls, *ids):
return cls.query.find({'trove_cat_id': {'$in': ids}}).all()
+ @classmethod
+ def by_trove_fullpaths(cls, *ids):
+ return cls.query.find({'fullpath': {'$in': ids}}).all()
+
def __json__(self):
return dict(
id=self.trove_cat_id,