Skip to content

Commit

Permalink
Fix bug in FormDefintion class
Browse files Browse the repository at this point in the history
Old method was overriding the method defined in a mixin (with a
different signature) that was called from api.forms
  • Loading branch information
jdavcs committed Aug 14, 2023
1 parent 2fb9d5a commit c8e19ba
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/galaxy/model/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9147,7 +9147,7 @@ class types(str, Enum):
dict_collection_visible_keys = ["id", "name"]
dict_element_visible_keys = ["id", "name", "desc", "form_definition_current_id", "fields", "layout"]

def to_dict(self, user=None, values=None, security=None):
def populate(self, user=None, values=None, security=None):
values = values or {}
form_def = {"id": security.encode_id(self.id) if security else self.id, "name": self.name, "inputs": []}
for field in self.fields:
Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy/webapps/galaxy/api/users.py
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,7 @@ def get_information(self, trans, id, **kwd):
values = None
if info_form_id == trans.security.encode_id(f.id) and user.values:
values = user.values.content
info_form = f.to_dict(user=user, values=values, security=trans.security)
info_form = f.populate(user=user, values=values, security=trans.security)
info_field["test_param"]["data"].append({"label": info_form["name"], "value": info_form["id"]})
info_field["cases"].append({"value": info_form["id"], "inputs": info_form["inputs"]})
inputs.append(info_field)
Expand Down

0 comments on commit c8e19ba

Please sign in to comment.