mirror of
https://github.com/inventree/InvenTree.git
synced 2025-09-04 01:35:54 +00:00
Add new attechment functionality to new models
- Giving the ol' refactor tractor a fresh coat of paint
This commit is contained in:
@@ -74,6 +74,11 @@ class PartAttachmentCreate(AjaxCreateView):
|
||||
ajax_form_title = _("Add part attachment")
|
||||
ajax_template_name = "modal_form.html"
|
||||
|
||||
def post_save(self):
|
||||
""" Record the user that uploaded the attachment """
|
||||
self.object.user = self.request.user
|
||||
self.object.save()
|
||||
|
||||
def get_data(self):
|
||||
return {
|
||||
'success': _('Added attachment')
|
||||
|
Reference in New Issue
Block a user