summaryrefslogtreecommitdiffstats
path: root/src/commands/db.rs
diff options
context:
space:
mode:
authorMatthias Beyer <matthias.beyer@atos.net>2021-01-11 10:24:57 +0100
committerMatthias Beyer <matthias.beyer@atos.net>2021-01-14 13:29:41 +0100
commit4a92855656e30ca4d22531eb41f263afa607d1f3 (patch)
tree0026f74ce95b29449dfdfc622fc7004a1138ffc4 /src/commands/db.rs
parent7c40da3f5e15d52183500e1b48aab79415ecea7a (diff)
Fix: Submit is associated with Package and Image
Make sure the inner_join() in the "submits" command implementation joins on the jobs table, not on the packages table. Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
Diffstat (limited to 'src/commands/db.rs')
-rw-r--r--src/commands/db.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/commands/db.rs b/src/commands/db.rs
index 9f438c9..b69d733 100644
--- a/src/commands/db.rs
+++ b/src/commands/db.rs
@@ -226,8 +226,7 @@ fn submits(conn_cfg: DbConnectionConfig, matches: &ArgMatches) -> Result<()> {
let data = if let Some(pkgname) = matches.value_of("with_pkg").map(String::from) {
schema::packages::table
.filter(schema::packages::name.eq(pkgname))
- .inner_join(schema::jobs::table)
- .inner_join(schema::submits::table)
+ .inner_join(schema::jobs::table.inner_join(schema::submits::table))
.select(schema::submits::all_columns)
.load::<models::Submit>(&conn)?
} else {