mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-05-16 13:56:11 +08:00
Default verbose to on ordering by id in the module-builds API
This commit is contained in:
@@ -396,9 +396,9 @@ def filter_component_builds(flask_request):
|
||||
if search_query:
|
||||
query = query.filter_by(**search_query)
|
||||
|
||||
# Order the results by any column in the ModuleBuild table.
|
||||
order_by = flask_request.args.get("order_by", None)
|
||||
order_desc_by = flask_request.args.get("order_desc_by", None)
|
||||
# Order the results by any column in the ModuleBuild table but default to id.
|
||||
order_by = flask_request.args.get('order_by', 'id')
|
||||
order_desc_by = flask_request.args.get('order_desc_by', None)
|
||||
if order_by or order_desc_by:
|
||||
column = getattr(models.ComponentBuild, order_desc_by or order_by, None)
|
||||
if column:
|
||||
|
||||
@@ -85,7 +85,7 @@ class AbstractQueryableBuildAPI(MethodView):
|
||||
|
||||
|
||||
def get(self, id):
|
||||
verbose_flag = request.args.get('verbose', 'false')
|
||||
verbose_flag = request.args.get('verbose', 'true')
|
||||
|
||||
if id is None:
|
||||
# Lists all tracked builds
|
||||
|
||||
Reference in New Issue
Block a user