We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5e0fecf + 3592cc8 commit 148f927Copy full SHA for 148f927
tools/create_trunks.py
@@ -39,15 +39,17 @@ def import_from_string(name):
39
setup_environ(settings)
40
from codespeed.models import Branch, Project
41
42
+
43
def main():
44
"""Add Branch default to projects if not there"""
45
projects = Project.objects.all()
46
47
for proj in projects:
- if not proj.branches.get(name='default'):
48
+ if not proj.branches.filter(name='default'):
49
trunk = Branch(name='default', project = proj)
50
trunk.save()
51
print "Created branch 'default' for project {0}".format(proj)
52
53
54
if __name__ == '__main__':
55
main()
0 commit comments