Verified Commit b2324a1f authored by Lukas Wiest's avatar Lukas Wiest 🚂
Browse files

refactor(systems/gitlab): TicketSystem: add missing check for null-on-error config

parent 36ee913a
Pipeline #1698 passed with stages
in 3 minutes and 1 second
......@@ -113,7 +113,11 @@ public class GitlabTicketSystem extends TicketSystem<GitlabTicket, GitlabTicketS
.get();
if (ret == null) return null;
else if (ret.size() != 1) throw new UnifiedticketingException("more or less than 1 dedicated ticket found");
else if (ret.size() != 1)
{
if (getConfigTrue(ConfigurationOptions.RETURN_NULL_ON_ERROR)) return null;
else throw new UnifiedticketingException("more or less than 1 dedicated ticket found");
}
else return ret.get(0);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment