core: history: fix bad logic

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
Merge branch 'gpaste-3.10'

* gpaste-3.10:
  core: history: fix bad logic