core: fix update when adding first item

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

* gpaste-3.10:
  core: fix update when adding first item
Merge branch 'gpaste-3.12'

* gpaste-3.12:
  core: fix update when adding first item