mirror of
https://github.com/inventree/InvenTree.git
synced 2026-10-09 03:36:26 +00:00
Move validation to the model class
This commit is contained in:
1 parent
4ee55847f1
commit
78309c1915
3 files changed
+17
-18
No files matched your search
@@ -88,6 +88,12 @@ function loadAttachmentTable(url, options) {
|
||||
link: {},
|
||||
comment: {},
|
||||
},
|
||||
processResults: function(data, fields, opts) {
|
||||
// Remove the "link" field if the attachment is a file!
|
||||
if (data.attachment) {
|
||||
delete opts.fields.link;
|
||||
}
|
||||
},
|
||||
onSuccess: reloadAttachmentTable,
|
||||
title: '{% trans "Edit Attachment" %}',
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user