Skip to content

Removing unused core.utils.make_latest #1399

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 6, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions readthedocs/core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,25 +35,6 @@ def run_on_app_servers(command):
return ret


def make_latest(project):
"""
Useful for correcting versions with no latest, using the database.

>>> no_latest = Project.objects.exclude(versions__slug__in=['latest'])
>>> for project in no_latest:
>>> make_latest(project)
"""
branch = project.default_branch or project.vcs_repo().fallback_branch
version_data, created = Version.objects.get_or_create(
project=project,
slug=LATEST,
type='branch',
active=True,
verbose_name=LATEST_VERBOSE_NAME,
identifier=branch,
)


def clean_url(url):
parsed = urlparse(url)
if parsed.scheme:
Expand Down