Skip to content

Commit

Permalink
Fix rendering of stream form fields (#3622)
Browse files Browse the repository at this point in the history
How to reproduce:
- open a application submisssion with checkboxes as an form element.
- Get the error below

```
'str' object has no attribute 'help_text'
```
  • Loading branch information
theskumar authored Oct 20, 2023
1 parent f47bfbb commit 88a7d69
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hypha/apply/categories/blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def render(self, value, context):
for field in category_fields.keys():
if not value.get(field):
category = value["category"]
if isinstance(category, int):
if isinstance(category, int) or isinstance(category, str):
category = self.get_instance(id=category)
value[field] = getattr(category, category_fields[field])
return super().render(value, context)
Expand Down

0 comments on commit 88a7d69

Please sign in to comment.