Skip to content

Commit

Permalink
Merge pull request galaxyproject#16553 from jdavcs/dev_formdef_bugfix
Browse files Browse the repository at this point in the history
Rename to_dict to populate in FormDefintion to fix bug
  • Loading branch information
guerler authored Aug 15, 2023
2 parents 2fb9d5a + c8e19ba commit 983bbfb
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 983bbfb

Please sign in to comment.