Skip to content

No image found for data source causes UI bugs #84

@Itaykal

Description

@Itaykal

When there's no image for at least one of the data sources the UI wont load any data source.
This bug originates in app/api/data_source.py in line 33:

@staticmethod def from_data_source_class(name: str, data_source_class: BaseDataSource) -> 'DataSourceTypeDto': with open(f"static/data_source_icons/{name}.png", "rb") as file: encoded_string = base64.b64encode(file.read()) image_base64 = f"data:image/png;base64,{encoded_string.decode()}" return DataSourceTypeDto( name=name, display_name=data_source_class.get_display_name(), config_fields=data_source_class.get_config_fields(), image_base64=image_base64, has_prerequisites=data_source_class.has_prerequisites() )

The function is lacking error handling, handle the errors and fix it.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions