Skip to content

Commit 8ff9166

Browse files
committed
Make sure the system_user template var is available
1 parent 2ce1e83 commit 8ff9166

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/web/server.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,9 @@ impl ServerGlobal {
260260
complete_context.insert("server", &self.base.server_info);
261261
if let Some(cookie) = cookies.get("system-user") {
262262
complete_context.insert("system_user", cookie.value());
263-
}
263+
} else {
264+
complete_context.insert("system_user", &Option::<&str>::None);
265+
};
264266
complete_context.extend(context);
265267

266268
match self

0 commit comments

Comments
 (0)