Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

core: Fix deletion of resources.

@kaos broke it in ae823f4
  • Loading branch information...
commit 338cc0ea823866502a7e92cc58323c4e57b30b18 1 parent d51aa3c
Arjan Scherpenisse arjan authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  src/models/m_rsc_gone.erl
2  src/models/m_rsc_gone.erl
View
@@ -76,7 +76,7 @@ gone(Id, Context) when is_integer(Id) ->
%% @doc Copy a resource to the 'gone' table, use the current user as the modifier (deleter).
%% Also sets the 'new id', which is the id that replaces the deleted id.
-gone(Id, NewId, Context) when is_integer(Id), is_integer(NewId) ->
+gone(Id, NewId, Context) when is_integer(Id), is_integer(NewId) orelse NewId =:= undefined ->
Props = z_db:assoc_row("
select id, name, version, page_path, uri, is_authoritative, creator_id, created
from rsc

2 comments on commit 338cc0e

Andreas Stenius
Owner

Ah, well of course. The one function without a spec I got wrong :p
Thanks for fixing it :)

Arjan Scherpenisse
Owner

I should've written one while I was at it...

Please sign in to comment.
Something went wrong with that request. Please try again.