From ff6184e343d9019fe91abf63bbcd5a766f04951f Mon Sep 17 00:00:00 2001 From: philipp Date: Tue, 24 Oct 2023 14:44:31 +0200 Subject: [PATCH] fix boat update error --- src/model/boat.rs | 4 ++-- templates/admin/boat/index.html.tera | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/model/boat.rs b/src/model/boat.rs index 696038e..024796c 100644 --- a/src/model/boat.rs +++ b/src/model/boat.rs @@ -60,7 +60,7 @@ pub struct BoatToUpdate<'r> { pub skull: bool, pub external: bool, pub location_id: i64, - pub owner_id: Option, + pub owner: Option, } impl Boat { @@ -229,7 +229,7 @@ ORDER BY amount_seats DESC boat.skull, boat.external, boat.location_id, - boat.owner_id, + boat.owner, self.id ) .execute(db) diff --git a/templates/admin/boat/index.html.tera b/templates/admin/boat/index.html.tera index 1878d8f..c19f107 100644 --- a/templates/admin/boat/index.html.tera +++ b/templates/admin/boat/index.html.tera @@ -4,6 +4,9 @@ {% extends "base" %} {% block content %} + {% if flash %} + {{ macros::alert(message=flash.1, type=flash.0, class="sm:col-span-2 lg:col-span-3") }} + {% endif %}

Boats