Skip to content

Commit

Permalink
Merge pull request #7042 from readthedocs/cleanup-version-admin
Browse files Browse the repository at this point in the history
  • Loading branch information
humitos committed May 11, 2020
2 parents dac751b + 212f5fd commit d2e26e1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion readthedocs/builds/admin.py
Expand Up @@ -106,8 +106,8 @@ class VersionAdmin(admin.ModelAdmin):

list_display = (
'slug',
'project_slug',
'type',
'project',
'privacy_level',
'active',
'built',
Expand All @@ -120,6 +120,9 @@ class VersionAdmin(admin.ModelAdmin):
raw_id_fields = ('project',)
actions = ['build_version', 'reindex_version', 'wipe_version', 'wipe_selected_versions']

def project_slug(self, obj):
return obj.project.slug

def wipe_selected_versions(self, request, queryset):
"""Wipes the selected versions."""
for version in queryset:
Expand Down

0 comments on commit d2e26e1

Please sign in to comment.