mirror of
https://github.com/minetest/contentdb.git
synced 2024-12-23 22:42:25 +01:00
Add ability to not include optional deps in deps API
This commit is contained in:
parent
c3cef1eed6
commit
064eb9df04
@ -58,7 +58,12 @@ def package(package):
|
|||||||
def package_dependencies(package):
|
def package_dependencies(package):
|
||||||
ret = []
|
ret = []
|
||||||
|
|
||||||
|
include_optional = request.args.get("include_optional", True)
|
||||||
|
|
||||||
for dep in package.dependencies:
|
for dep in package.dependencies:
|
||||||
|
if not include_optional and dep.option:
|
||||||
|
continue
|
||||||
|
|
||||||
name = None
|
name = None
|
||||||
fulfilled_by = None
|
fulfilled_by = None
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user