Task: Modified the way UUIDs are validated

This commit is contained in:
Paul Beckingham 2015-09-19 08:56:01 -04:00
parent b4077775c2
commit 6b69903208

View file

@ -1427,10 +1427,9 @@ void Task::validate (bool applyDefault /* = true */)
if (has ("uuid") && uid != "")
{
Lexer lex (uid);
std::string token;
Lexer::Type type;
if (! lex.token (uid, type) ||
uid.length () != 36 ||
type != Lexer::Type::uuid)
if (! lex.isUUID (token, type, false))
throw format (STRING_CMD_IMPORT_UUID_BAD, uid);
}
else