summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/commands/db.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/commands/db.rs b/src/commands/db.rs
index dde8827..bafc661 100644
--- a/src/commands/db.rs
+++ b/src/commands/db.rs
@@ -245,9 +245,10 @@ fn submits(conn_cfg: DbConnectionConfig, matches: &ArgMatches) -> Result<()> {
let submits = if let Some(pkgname) = matches.value_of("with_pkg").map(String::from) {
// Get all submits which included the package, but were not made _for_ the package
- let submits_with_pkg = schema::packages::table
+ let submits_with_pkg = schema::submits::table
+ .inner_join(schema::jobs::table)
+ .inner_join(schema::packages::table)
.filter(schema::packages::name.eq(&pkgname))
- .inner_join(schema::jobs::table.inner_join(schema::submits::table))
.select(schema::submits::all_columns)
.load::<models::Submit>(&conn)?;