diff options
Diffstat (limited to 'src/db/models/artifact.rs')
-rw-r--r-- | src/db/models/artifact.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/db/models/artifact.rs b/src/db/models/artifact.rs index 31f80fb..4faf7c4 100644 --- a/src/db/models/artifact.rs +++ b/src/db/models/artifact.rs @@ -46,11 +46,10 @@ impl Artifact { diesel::insert_into(artifacts::table) .values(&new_art) - .on_conflict_do_nothing() .execute(database_connection)?; dsl::artifacts - .filter(path.eq(path_str)) + .filter(path.eq(path_str).and(job_id.eq(job.id))) .first::<Artifact>(database_connection) .map_err(Error::from) } |