Fix browserlist and import fail on duplicate tags

Signed-off-by: trivernis <trivernis@protonmail.com>
pull/14/head
trivernis 3 years ago
parent 516b27d7ad
commit 6007d2a096
Signed by: Trivernis
GPG Key ID: DFFFCC2C7A02DB45

@ -28,11 +28,13 @@ impl TagDao {
}) })
.collect(); .collect();
content_descriptor_tag::Entity::insert_many(active_models) if !active_models.is_empty() {
.exec(&trx) content_descriptor_tag::Entity::insert_many(active_models)
.await?; .exec(&trx)
.await?;
trx.commit().await?; trx.commit().await?;
}
Ok(()) Ok(())
} }
@ -60,7 +62,7 @@ async fn get_existing_mappings(
.all(trx) .all(trx)
.await? .await?
.into_iter() .into_iter()
.map(|model: content_descriptor_tag::Model| (model.tag_id, model.cd_id)) .map(|model: content_descriptor_tag::Model| (model.cd_id, model.tag_id))
.collect(); .collect();
Ok(existing_mappings) Ok(existing_mappings)
} }

@ -11,7 +11,6 @@
last 1 Chrome version last 1 Chrome version
last 1 Firefox version last 1 Firefox version
last 2 Edge major versions last 2 Edge major versions
last 2 Safari major versions
last 2 iOS major versions last 2 iOS major versions
Firefox ESR Firefox ESR
not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line. not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line.

Loading…
Cancel
Save