Skip to content

Commit

Permalink
Merge pull request #77 from cap-js/Issue-73-appcrash
Browse files Browse the repository at this point in the history
Issue 73:App crash
  • Loading branch information
yashmeet29 authored Oct 28, 2024
2 parents c3ea69a + d55a480 commit 87c84e8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
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

0 comments on commit 87c84e8

Please sign in to comment.