TW-1636: UUID with numeric-only first segment is not parsed properly
- Switched Nibbler::getUUID to Nibbler::getPartialUUID, which caused partial UUID mathcing to fail sometimes. - Changed precedence to search for UUID before ID, which solves the numeric UUID problem.
This commit is contained in:
13
src/DOM.cpp
13
src/DOM.cpp
@@ -255,24 +255,23 @@ bool DOM::get (const std::string& name, const Task& task, Variant& value)
|
||||
std::string uuid;
|
||||
bool proceed = false;
|
||||
|
||||
if (n.getInt (id) && n.depleted ())
|
||||
if (n.getPartialUUID (uuid) && n.depleted ())
|
||||
{
|
||||
if (id == task.id)
|
||||
if (uuid == task.get ("uuid"))
|
||||
ref = task;
|
||||
else
|
||||
context.tdb2.get (id, ref);
|
||||
context.tdb2.get (uuid, ref);
|
||||
|
||||
proceed = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
n.restore ();
|
||||
if (n.getUUID (uuid) && n.depleted ())
|
||||
if (n.getInt (id) && n.depleted ())
|
||||
{
|
||||
if (uuid == task.get ("uuid"))
|
||||
if (id == task.id)
|
||||
ref = task;
|
||||
else
|
||||
context.tdb2.get (uuid, ref);
|
||||
context.tdb2.get (id, ref);
|
||||
|
||||
proceed = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user