diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2020-11-06 11:45:28 +0100 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2020-11-06 13:27:12 +0100 |
commit | d9f6c396808b5cbee18ca2f37e4eb82df215d5fd (patch) | |
tree | f6a3b636e5792dca004a26310c8569d47c1d7e82 /src/db | |
parent | 1d3cd3a1abd1755177cc94e5e263ed785203c937 (diff) |
Fix: Do not actually write package tree into database
This is a quickfix to get to a state where we can push jobs to the
endpoints.
The "fix" is to not serialize the tree into a JSON object, because we
cannot do this with the key of a tree entry being a non-String.
We have to work around this limitation of JSON, but this is not the time
to do it.
This patch should be reverted as soon as possible, and a real fix be
implemented.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'src/db')
-rw-r--r-- | src/db/models/submit.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/db/models/submit.rs b/src/db/models/submit.rs index c3757b9..b8aed64 100644 --- a/src/db/models/submit.rs +++ b/src/db/models/submit.rs @@ -38,7 +38,7 @@ struct NewSubmit<'a> { impl Submit { pub fn create(database_connection: &PgConnection, - t: &crate::package::Tree, + _t: &crate::package::Tree, submit_datetime: &NaiveDateTime, submit_id: &::uuid::Uuid, requested_image: &Image, @@ -46,7 +46,10 @@ impl Submit { repo_hash: &GitHash) -> Result<Submit> { - let tree_json = serde_json::to_value(t)?; + //let tree_json = serde_json::to_value(t) + // .context("Converting tree to JSON string") + // .with_context(|| anyhow!("Tree = {:#?}", t))?; + let tree_json = serde_json::Value::default(); // TODO: Fixme let new_submit = NewSubmit { uuid: submit_id, |