saving some updates

This commit is contained in:
Chris Cochrun 2024-09-17 15:32:34 -05:00
parent bb3a5d9b7b
commit 9b75c366de
4 changed files with 70 additions and 39 deletions

View file

@ -156,6 +156,7 @@ mod image_model {
}
}
use crate::models::run_migrations;
use crate::schema::images::dsl::*;
use cxx_qt::CxxQtType;
use cxx_qt_lib::{QModelIndex, QString, QUrl, QVariant};
@ -197,6 +198,7 @@ impl image_model::ImageModel {
pub fn setup(mut self: Pin<&mut Self>) {
let db = &mut self.as_mut().get_db();
run_migrations(db);
let results = images
.load::<crate::models::Image>(db)
.expect("Error loading images");