Skip to content

Commit

Permalink
marklogic-community#109 simplify priority error checking
Browse files Browse the repository at this point in the history
  • Loading branch information
dmcassel committed Mar 8, 2016
1 parent c3f2000 commit 3ae1681
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions deploy/lib/xquery/triggers.xqy
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,7 @@ declare function triggers:load-from-config($config as element(trgr:triggers))
xdmp:default-permissions()
)[1]
let $recursive as xs:boolean := ($trgr/trgr:recursive, fn:true())[1]
let $priority as xs:string? := $trgr/trgr:task-priority
let $_ :=
if (fn:empty($priority) or $priority = ("normal", "higher")) then ()
else
fn:error(xs:QName("PRIORITY-VALUE"), 'Task priority must be "normal" or "higher".')
let $priority as xs:string := ($trgr/trgr:task-priority, "normal")[1]
return
if (fn:exists(/trgr:trigger/trgr:trigger-name[. = $name])) then
(: trigger already exists. update it :)
Expand Down

0 comments on commit 3ae1681

Please sign in to comment.