Browse Source

replace endswith with list contains

Simon Hellmayr 16 hours ago
parent
commit
f408fcbdd0

+ 1 - 1
src/sentry/api/endpoints/team_projects.py

@@ -223,7 +223,7 @@ class TeamProjectsEndpoint(TeamEndpoint, EnvironmentMixin):
                 project.update_option("sentry:similarity_backfill_completed", int(time.time()))
 
             # Add electron symbol server by default to both electron and javascript-electron projects
-            if project.platform and project.platform.endswith("electron"):
+            if project.platform and project.platform in ["electron", "javascript-electron"]:
                 project.update_option(
                     "sentry:builtin_symbol_sources", ["ios", "microsoft", "electron"]
                 )

+ 1 - 1
src/sentry/projects/services/project/impl.py

@@ -133,7 +133,7 @@ class DatabaseBackedProjectService(ProjectService):
                 user_id=user_id,
             )
             # Add electron symbol server by default to both electron and javascript-electron projects
-            if project.platform and project.platform.endswith("electron"):
+            if project.platform and project.platform in ["electron", "javascript-electron"]:
                 project.update_option(
                     "sentry:builtin_symbol_sources", ["ios", "microsoft", "electron"]
                 )