diff --git a/TODO b/TODO index 1d6d4d3..63919c2 100644 --- a/TODO +++ b/TODO @@ -6,8 +6,6 @@ TODO: - we might consider adding a link to the all layers and all recipes tables from the layer details page -* Ensure publishing a published layer doesn't do anything - * Need an "About" section descriptibing what the site is for * Need an admin contact in footer * Some columns are a bit crushed diff --git a/layerindex/views.py b/layerindex/views.py index 374e144..a96ec40 100644 --- a/layerindex/views.py +++ b/layerindex/views.py @@ -77,8 +77,9 @@ def publish(request, name): def _statuschange(request, name, newstatus): w = get_object_or_404(LayerItem, name=name) - w.change_status(newstatus, request.user.username) - w.save() + if w.status != newstatus: + w.change_status(newstatus, request.user.username) + w.save() return HttpResponseRedirect(reverse('layer_item', args=(name,))) class LayerListView(ListView):