Better check
@@ -216,9 +216,8 @@ class ProjectViewSet(UserSelectViewSet):
)
promoted_version = project.update_stable_version()
- if promoted_version:
new_stable = project.get_stable_version()
- if new_stable.active:
+ if promoted_version and new_stable and new_stable.active:
log.info(
'Triggering new stable build: {project}:{version}'.format(
project=project.slug,
