From 0dae63a578adaf1d3ef63248fe26cd1ba86aaf31 Mon Sep 17 00:00:00 2001 From: Dannon Baker Date: Tue, 23 Jan 2018 10:33:08 -0500 Subject: [PATCH] Fix a mutable default function arg noticed when digging through history API code. --- lib/galaxy/webapps/galaxy/api/histories.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/galaxy/webapps/galaxy/api/histories.py b/lib/galaxy/webapps/galaxy/api/histories.py index 076fe7a5060..2fa6ca48d08 100644 --- a/lib/galaxy/webapps/galaxy/api/histories.py +++ b/lib/galaxy/webapps/galaxy/api/histories.py @@ -507,7 +507,7 @@ class HistoriesController(BaseAPIController, ExportsHistoryMixin, ImportsHistory return self.serve_ready_history_export(trans, jeha) @expose_api - def get_custom_builds_metadata(self, trans, id, payload={}, **kwd): + def get_custom_builds_metadata(self, trans, id, payload=None, **kwd): """ GET /api/histories/{id}/custom_builds_metadata Returns meta data for custom builds. @@ -515,6 +515,8 @@ class HistoriesController(BaseAPIController, ExportsHistoryMixin, ImportsHistory :param id: the encoded history id :type id: str """ + if payload is None: + payload = {} history = self.history_manager.get_accessible(self.decode_id(id), trans.user, current_history=trans.history) installed_builds = [] for build in glob.glob(os.path.join(trans.app.config.len_file_path, "*.len")):