mirror of
https://github.com/minetest/contentdb.git
synced 2024-12-23 06:22:24 +01:00
Fix limit arg in QueryBuilder
This commit is contained in:
parent
c13b13268b
commit
bd25a8d601
@ -37,7 +37,7 @@ class QueryBuilder:
|
||||
|
||||
self.random = "random" in args
|
||||
self.lucky = "lucky" in args
|
||||
self.limit = 1 if self.lucky else args.get("limit")
|
||||
self.limit = 1 if self.lucky else get_int_or_abort(args.get("limit"), None)
|
||||
self.order_by = args.get("sort")
|
||||
self.order_dir = args.get("order") or "desc"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user