mirror of
https://github.com/inventree/InvenTree.git
synced 2025-08-07 12:22:11 +00:00
Merge pull request from GHSA-7rq4-qcpw-74gq
* Create custom ModelResource subclass - Strips illegal starting characters from string cells - Prevents formula injection * Update all existing ModelResource classes to base off InvenTreeResource * Handle more complex case where an illegal char is hidden behind another one
This commit is contained in:
@@ -4,15 +4,14 @@ from django.contrib import admin
|
||||
|
||||
from import_export.admin import ImportExportModelAdmin
|
||||
from import_export.fields import Field
|
||||
from import_export.resources import ModelResource
|
||||
import import_export.widgets as widgets
|
||||
|
||||
from build.models import Build, BuildItem
|
||||
|
||||
from InvenTree.admin import InvenTreeResource
|
||||
import part.models
|
||||
|
||||
|
||||
class BuildResource(ModelResource):
|
||||
class BuildResource(InvenTreeResource):
|
||||
"""Class for managing import/export of Build data."""
|
||||
# For some reason, we need to specify the fields individually for this ModelResource,
|
||||
# but we don't for other ones.
|
||||
|
Reference in New Issue
Block a user