@@ -145,8 +145,8 @@ class ProjectTriggerBuildMixin:
145145 """
146146 Mixin to trigger build on form save.
147147
148- We trigger a build to the default branch and the LATEST version of the project,
149- since both are related, latest is an alias of the default version .
148+ We trigger a build to LATEST version of the project, and the version
149+ that LATEST points to, since latest is just an alias.
150150
151151 This should be replaced with signals instead of calling trigger_build
152152 explicitly.
@@ -156,11 +156,11 @@ def save(self, commit=True):
156156 """Trigger build on commit save."""
157157 project = super ().save (commit )
158158 if commit :
159- default_branch = project .versions . filter ( slug = project . get_default_branch ()). first ()
160- if default_branch and default_branch .active :
161- trigger_build (project = project , version = default_branch )
159+ original_latest_version = project .get_original_latest_version ()
160+ if original_latest_version and original_latest_version .active :
161+ trigger_build (project = project , version = original_latest_version )
162162 latest_version = project .get_latest_version ()
163- if latest_version and latest_version != default_branch and latest_version .active :
163+ if latest_version and latest_version .active :
164164 trigger_build (project = project , version = latest_version )
165165 return project
166166
0 commit comments