Remove double if
remove double if
Merge pull request #5146 from lucasmichot/4.2-performances

[4.2] Database : remove double if