Skip to content

Commit 148f927

Browse files
committed
Merge remote branch 'origin/master' into pypy
2 parents 5e0fecf + 3592cc8 commit 148f927

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tools/create_trunks.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,17 @@ def import_from_string(name):
3939
setup_environ(settings)
4040
from codespeed.models import Branch, Project
4141

42+
4243
def main():
4344
"""Add Branch default to projects if not there"""
4445
projects = Project.objects.all()
4546

4647
for proj in projects:
47-
if not proj.branches.get(name='default'):
48+
if not proj.branches.filter(name='default'):
4849
trunk = Branch(name='default', project = proj)
4950
trunk.save()
5051
print "Created branch 'default' for project {0}".format(proj)
5152

53+
5254
if __name__ == '__main__':
5355
main()

0 commit comments

Comments
 (0)