Commit f4ebdf17 authored by Heinz N. Gies's avatar Heinz N. Gies

Fix imgadm format

parent 5cc74998
......@@ -55,7 +55,7 @@ struct Image {
os: String,
origin: Option<Uuid>,
files: Vec<ImageFile>,
published_at: DateTime<Utc>,
published_at: Option<DateTime<Utc>>,
public: bool,
state: String,
disabled: bool,
......@@ -78,7 +78,12 @@ impl Image {
return Ok(images);
}
fn print(&self, table: &mut Table, parsable: bool) {
let date = format!("{}", self.published_at.format("%Y-%m-%d"));
let date = match self.published_at{
Some(published_at) =>
format!("{}", published_at.format("%Y-%m-%d")),
_ => String::from("-")
};
if parsable {
println!(
"{}:{}:{}:{}:{}:{}",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment