Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 73:App crash #77

Merged
merged 3 commits into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion index.cds
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using { Attachments} from '@cap-js/attachments';
extend aspect Attachments with {
folderId : String @title: 'Folder ID';
folderId : String @title: 'Folder ID' @readonly;
};

annotate Attachments with @UI:{
Expand All @@ -16,6 +16,7 @@ annotate Attachments with @UI:{
{Value: note}
]
} {
url @readonly;
content
@Core.ContentDisposition: { Filename: filename }
@Core.Immutable
Expand Down
2 changes: 2 additions & 0 deletions lib/sdm.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ async isFileNameDuplicateInDrafts(data,req) {
if (attachments) {
const diffData = await req.diff();
let deletedAttachments = [];
if(diffData.attachments){
diffData.attachments
.filter((object) => {
return object._op === "delete";
Expand Down Expand Up @@ -243,6 +244,7 @@ async isFileNameDuplicateInDrafts(data,req) {
}
}
}
}
}

async deleteAttachmentsWithKeys(records, req) {
Expand Down
Loading