# HG changeset patch # User Matti Hamalainen # Date 1613033033 -7200 # Node ID 319c2e73860cc003ab99c467e7ce1cd36aa2795a # Parent 5eca657134a5b094d1637aa53c21b5631f20d89a tj: When deleting a TJ, check if it exists and say so if it does not. diff -r 5eca657134a5 -r 319c2e73860c tj.tcl --- a/tj.tcl Thu Feb 11 10:32:51 2021 +0200 +++ b/tj.tcl Thu Feb 11 10:43:53 2021 +0200 @@ -438,6 +438,11 @@ return 1 } + if {$nitems == 0} { + tj_msg $upublic $unick $uchan "err_no_such_id" [list $uid] + return 1 + } + set usql "DELETE FROM tj WHERE uuser='[utl_escape $uhand]' AND uid LIKE '[utl_escape $uid]'" if {[catch {set ndone [tj_dbh onecolumn $usql]} uerrmsg]} { tj_msg $upublic $unick $uchan "err_sql" [list $uerrmsg]