mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 02:09:02 +08:00
Count only the material packages by author, not all packages.
Contributes to CURA-5670.
This commit is contained in:
parent
bf1d3b964f
commit
b638b2274a
@ -518,7 +518,8 @@ class Toolbox(QObject, Extension):
|
||||
@pyqtSlot(str, result = int)
|
||||
def getTotalNumberOfMaterialPackagesByAuthor(self, author_id: str) -> int:
|
||||
count = 0
|
||||
for package in self._metadata["materials_available"]:
|
||||
for package in self._metadata["packages"]:
|
||||
if package["package_type"] == "material":
|
||||
if package["author"]["author_id"] == author_id:
|
||||
count += 1
|
||||
return count
|
||||
|
Loading…
x
Reference in New Issue
Block a user