fix: only upload attachments that are files
This commit is contained in:
parent
b3f1ed596c
commit
fa7d565238
2 changed files with 18 additions and 14 deletions
|
@ -103,20 +103,22 @@ impl Actor for ImportCardActor {
|
||||||
.result?
|
.result?
|
||||||
.attachments;
|
.attachments;
|
||||||
for trello_attachment in attachments.into_iter() {
|
for trello_attachment in attachments.into_iter() {
|
||||||
let trello_attachment_name = trello_attachment.name.clone();
|
if trello_attachment.is_upload {
|
||||||
let child = spawn_in_thread!(
|
let trello_attachment_name = trello_attachment.name.clone();
|
||||||
actor_ref,
|
let child = spawn_in_thread!(
|
||||||
ImportAttachmentActor::new(
|
actor_ref,
|
||||||
this.ctx.clone(),
|
ImportAttachmentActor::new(
|
||||||
this.nextcloud_board_id,
|
this.ctx.clone(),
|
||||||
this.nextcloud_stack_id,
|
this.nextcloud_board_id,
|
||||||
nextcloud_card.id,
|
this.nextcloud_stack_id,
|
||||||
this.trello_card.id.clone(),
|
nextcloud_card.id,
|
||||||
trello_attachment,
|
this.trello_card.id.clone(),
|
||||||
)
|
trello_attachment,
|
||||||
);
|
)
|
||||||
this.attachments_children
|
);
|
||||||
.insert(child.id(), (trello_attachment_name, child.clone()));
|
this.attachments_children
|
||||||
|
.insert(child.id(), (trello_attachment_name, child.clone()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if this.labels_children.is_empty() && this.attachments_children.is_empty() {
|
if this.labels_children.is_empty() && this.attachments_children.is_empty() {
|
||||||
|
|
|
@ -26,4 +26,6 @@ pub(crate) struct TrelloAttachment {
|
||||||
pub(crate) url: TrelloAttachmentUrl, //"https://admin.typeform.com/form/RzExEM/share#/link",
|
pub(crate) url: TrelloAttachmentUrl, //"https://admin.typeform.com/form/RzExEM/share#/link",
|
||||||
#[serde(rename = "fileName")]
|
#[serde(rename = "fileName")]
|
||||||
pub(crate) file_name: TrelloAttachmentFilename,
|
pub(crate) file_name: TrelloAttachmentFilename,
|
||||||
|
#[serde(rename = "isUpload")]
|
||||||
|
pub(crate) is_upload: bool,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue