File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed
src/sentry/api/serializers/models Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -250,14 +250,9 @@ def get_attrs(
250250 if self ._expand ("projects" ):
251251 project_teams = ProjectTeam .objects .get_for_teams_with_org_cache (item_list )
252252
253- # Deduplicate: a project on multiple teams would otherwise get
254- # its features list multiplied during serialization.
255- seen : set [int ] = set ()
256- projects = []
257- for pt in project_teams :
258- if pt .project_id not in seen :
259- seen .add (pt .project_id )
260- projects .append (pt .project )
253+ # Deduplicate: a project on multiple teams would cause
254+ # duplicate features during serialization.
255+ projects = list ({pt .project_id : pt .project for pt in project_teams }.values ())
261256
262257 projects_by_id = {
263258 project .id : data
You can’t perform that action at this time.
0 commit comments