Fix #1621 : User query per last applied template triggers an error
Merge pull request #839 from romainneutron/fix-1621

Fix #1621 : User query per last applied template triggers an error