From 86f42ba126f1d74270841723881dc4635dc76964 Mon Sep 17 00:00:00 2001 From: Chris Date: Fri, 27 Jul 2018 12:24:53 +0100 Subject: [PATCH] Remove the need to mess with $args for edits --- modules/ORB/System/Recipe.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/ORB/System/Recipe.pm b/modules/ORB/System/Recipe.pm index 5005591..d260f9e 100644 --- a/modules/ORB/System/Recipe.pm +++ b/modules/ORB/System/Recipe.pm @@ -243,15 +243,15 @@ sub edit { # Move the old recipe to the end of the table, but keep a record # of its current ID - $args -> {"id"} = $args -> {"previd"}; - $args -> {"previd"} = $self -> _renumber_recipe($args -> {"previd"}); + $args -> {"id"} = $args -> {"previd"}; + my $renumbered = $self -> _renumber_recipe($args -> {"id"}); # Create a new one at the old ID $self -> create($args) or return undef; # Set the status of the edited recipe - $self -> set_status($args -> {"previd"}, + $self -> set_status($renumbered, $self -> {"settings"} -> {"config"} -> {"Recipe:status:edited"} // "Edited", $args -> {"updaterid"}) or return undef;