Merge pull request #436 from pypeclub/bugfix/empty_enumerator_attributes

Bugfix/empty enumerator attributes
This commit is contained in:
Milan Kolar 2020-08-17 11:55:58 +02:00 committed by GitHub
commit 7e9787ee8c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -409,6 +409,10 @@ class CustomAttributes(BaseAction):
))
)
)
# Make sure there is at least one item
if not app_definitions:
app_definitions.append({"empty": "< Empty >"})
return app_definitions
def applications_attribute(self, event):
@ -432,6 +436,10 @@ class CustomAttributes(BaseAction):
if usage:
tools_data.append({tool_name: tool_name})
# Make sure there is at least one item
if not tools_data:
tools_data.append({"empty": "< Empty >"})
tools_custom_attr_data = {
"label": "Tools",
"key": "tools_env",