Skip to content

Commit bd389c0

Browse files
committed
Update Hackathon PR Metrics Queries
- Change PR query to use `user_profile` instead of `user` for participant counting - Modify merged PR query to use `is_merged=True` instead of `state="merged"` - Refine hackathon detail view metrics calculation for more accurate PR tracking
1 parent 8bc4585 commit bd389c0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

website/views/hackathon.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def get_context_data(self, **kwargs):
114114
created_at__lte=hackathon.end_time,
115115
type="pull_request",
116116
)
117-
.values("user")
117+
.values("user_profile")
118118
.distinct()
119119
.count()
120120
)
@@ -137,7 +137,7 @@ def get_context_data(self, **kwargs):
137137
created_at__gte=hackathon.start_time,
138138
created_at__lte=hackathon.end_time,
139139
type="pull_request",
140-
state="merged",
140+
is_merged=True,
141141
).count()
142142

143143
context["merged_pr_count"] = merged_pr_count

0 commit comments

Comments
 (0)