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

Task: Remove now unrequired check

We now ensure that we have a valid file when a fileId is stored, and we
ensured that a task has either an mrl or a fileId

(cherry picked from commit 19195148)
Signed-off-by: default avatarHugo Beauzée-Luyssen <>
parent 75f404d6
......@@ -356,18 +356,16 @@ bool Task::restoreLinkedEntities()
// Now we either have a task with an existing file, and we managed to fetch
// it, or the task was not processed yet, and we don't have a fileId (and
// therefor no file instance)
assert( m_fileId == 0 || file != nullptr );
// We might re-create tasks without mrl to ease the handling of files on
// external storage.
if ( mrl.empty() == true )
// but we expect those to be created from an existing file after a
// partial/failed migration. If we don't have a file nor an mrl, we
// can't really process it.
if ( file == nullptr )
assert( !"Can't process a file without a file nor an mrl" );
return false;
assert( m_fileId != 0 && file != nullptr );
mrl = file->mrl();
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