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:
@@ -115,7 +115,7 @@ bool TF2::get (int id, Task& task)
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Locate task by uuid.
|
||||
// Locate task by uuid, which may be a partial UUID.
|
||||
bool TF2::get (const std::string& uuid, Task& task)
|
||||
{
|
||||
if (! _loaded_tasks)
|
||||
@@ -123,7 +123,7 @@ bool TF2::get (const std::string& uuid, Task& task)
|
||||
|
||||
for (auto& i : _tasks)
|
||||
{
|
||||
if (i.get ("uuid") == uuid)
|
||||
if (closeEnough (i.get ("uuid"), uuid, uuid.length ()))
|
||||
{
|
||||
task = i;
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user