my $Ticket = LoadTicket($ARGS{'id'});
my $Draft = RT::Attribute->new( $session{'CurrentUser'} );
-$Draft->LoadByNameAndObject( Object => $session{'CurrentUser'}, Name => 'Draft-'.$Ticket->id );
+$Draft->LoadByNameAndObject( Object => $session{'CurrentUser'}->UserObj, Name => 'Draft-'.$Ticket->id );
if ( $ARGS{'SaveDraft'} ) {
if ( $Draft && $Draft->Id ) {
$Draft->SetContentType( $ARGS{'UpdateContentType'} || 'text/plain' );
} else {
$Draft->Create( Name => 'Draft-'.$Ticket->id,
- Object => $session{'CurrentUser'},
+ Object => $session{'CurrentUser'}->UserObj,
Content => $ARGS{'UpdateContent'},
ContentType => $ARGS{'UpdateContentType'} || 'text/plain',
);