X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/9db8b697e257cef1e8ffaef832cd650873eb971e..2aca922662d31019e89e1346a38839f2f07a3a28:/SL/Controller/TimeRecording.pm?ds=inline diff --git a/SL/Controller/TimeRecording.pm b/SL/Controller/TimeRecording.pm index d326522be..5c442cc4c 100644 --- a/SL/Controller/TimeRecording.pm +++ b/SL/Controller/TimeRecording.pm @@ -184,10 +184,10 @@ sub init_time_recording { } # do not overwrite staff member if you do not have the right - delete $attributes{staff_member_id} if !$_[0]->can_edit_all; - $attributes{staff_member_id} = SL::DB::Manager::Employee->current->id if $is_new; + delete $attributes{staff_member_id} if !$_[0]->can_edit_all; + $attributes{staff_member_id} ||= SL::DB::Manager::Employee->current->id if $is_new; - $attributes{employee_id} = SL::DB::Manager::Employee->current->id; + $attributes{employee_id} = SL::DB::Manager::Employee->current->id; $time_recording->assign_attributes(%attributes);