Skip to content

Commit

Permalink
Revert "Merge pull request #3336 from rtfd/use-active-for-stable"
Browse files Browse the repository at this point in the history
This reverts commit 0d9c3fe, reversing
changes made to 73b693c.
  • Loading branch information
ericholscher authored and agjohnson committed Dec 6, 2017
1 parent b94168f commit 3122a05
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion readthedocs/projects/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,7 @@ def update_stable_version(self):
if current_stable:
identifier_updated = (
new_stable.identifier != current_stable.identifier)
if identifier_updated and current_stable.active:
if identifier_updated and current_stable.machine:
log.info(
"Update stable version: {project}:{version}".format(
project=self.slug,
Expand Down
1 change: 1 addition & 0 deletions readthedocs/projects/views/private.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ def project_version_detail(request, project_slug, version_slug):
log.info('Removing files for version %s', version.slug)
broadcast(type='app', task=tasks.clear_artifacts, args=[version.pk])
version.built = False
version.machine = False
version.save()
url = reverse('project_version_list', args=[project.slug])
return HttpResponseRedirect(url)
Expand Down
5 changes: 1 addition & 4 deletions readthedocs/rtd_tests/tests/test_sync_versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,9 +349,6 @@ def test_update_stable_version(self):
self.assertEqual(version_stable.identifier, '1.0.0')

def test_update_inactive_stable_version(self):
"""
Test that stable doesn't get updated when it isn't active
"""
version_post_data = {
'branches': [
{
Expand Down Expand Up @@ -391,7 +388,7 @@ def test_update_inactive_stable_version(self):

version_stable = Version.objects.get(slug=STABLE)
self.assertFalse(version_stable.active)
self.assertEqual(version_stable.identifier, '0.9')
self.assertEqual(version_stable.identifier, '1.0.0')

def test_stable_version_tags_over_branches(self):
version_post_data = {
Expand Down

0 comments on commit 3122a05

Please sign in to comment.