Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix incorrect custom event types on dashboard #91

Merged
merged 1 commit into from
Sep 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions dashboard/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,14 +234,17 @@ def get_custom_graphs_by_event(project_name, event_type_id):

def get_event_types(project_name):
custom_event_types = get_custom_event_types_by_project(project_name)

project_event_types = {}
for custom_type in custom_event_types:
event_type_labels_to_event_mapping[
f"{custom_type['category']} - {custom_type['subcategory']}"
] = custom_type
project_event_types[
f"{custom_type['category']} - {custom_type['subcategory']}"
] = custom_type
# When we have custom events, we will want to change this to include both default and custom events
default_types = [member.value for member in EventTypes]
default_types.extend(event_type_labels_to_event_mapping.keys())
default_types.extend(project_event_types.keys())
return default_types


Expand Down
Loading