Skip to content

Commit c247e27

Browse files
committed
Fix how default branch is determined - currectly it resulted in default
branch being called "default" instead of reading the value of default_branch attribute of the project model. With this change / fix COMP_EXECUTABLES now works correctly when a default branch is called something else than "default".
1 parent b362022 commit c247e27

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

codespeed/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ def comparison(request):
225225
else:
226226
rev = Revision.objects.get(commitid=rev)
227227
key += str(rev.id)
228-
key += "+default"
228+
key += "+%s" % (exe.project.default_branch)
229229
if key in exekeys:
230230
checkedexecutables.append(key)
231231
else:

codespeed/views_data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def getcomparisonexes():
138138
if len(exestring) > maxlen:
139139
exestring = str(exe)[0:maxlen] + "..."
140140
name = exestring + " latest"
141-
if branch.name != 'default':
141+
if branch.name != proj.default_branch:
142142
name += " in branch '" + branch.name + "'"
143143
key = str(exe.id) + "+L+" + branch.name
144144
executablekeys.append(key)

0 commit comments

Comments
 (0)