Commit bdd57b52 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

Task: Fix invalid tasks filtering

We used to create task for external files (ie. m_parentFolderId == 0)
but this was fixed shortly after we bumped to model 12.
TL;DR: Even if we're migrating from model 11 or below, we can't have a
null parentFolderId anymore
parent 55792999
......@@ -329,11 +329,11 @@ bool Task::restoreLinkedEntities()
{
LOG_INFO("Restoring linked entities of task ", m_id);
// MRL will be empty if the task has been resumed from unparsed files
// parentFolderId == 0 indicates an external file
// (during 11 -> 12 migration)
auto mrl = m_item.mrl();
if ( mrl.empty() == true && m_parentFolderId == 0 )
if ( mrl.empty() == true && m_fileId == 0 )
{
LOG_WARN( "Aborting & removing external file task (#", m_id, ')' );
LOG_WARN( "Aborting & removing file task without mrl nor file id (#", m_id, ')' );
destroy( m_ml, m_id );
return false;
}
......
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