From d5395f42968efdcc0dfda7bffa27924ba8566a44 Mon Sep 17 00:00:00 2001 From: Luc Didry Date: Sat, 22 Jul 2017 19:17:31 +0200 Subject: [PATCH] Bug in SQLite file layer --- lib/Lufi/DB/File/SQLite.pm | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/Lufi/DB/File/SQLite.pm b/lib/Lufi/DB/File/SQLite.pm index e0e37a9..bd6bd2c 100644 --- a/lib/Lufi/DB/File/SQLite.pm +++ b/lib/Lufi/DB/File/SQLite.pm @@ -79,12 +79,8 @@ sub get_empty { my $c = shift; my @records = Lufi::DB::SQLite::Files->select('WHERE created_at IS NULL LIMIT 1'); - $c->record($records[0]); - $c->record->update(created_at => time); - $c->write; - $c->_slurp; - return $c; + return $c->record($records[0])->_slurp->created_at(time)->write; } sub get_stats {