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

[0.17.x] Import fix (#8924) #8926

Merged
merged 1 commit into from
Jan 20, 2025
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
6 changes: 6 additions & 0 deletions src/backend/InvenTree/importer/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import tablib
from rest_framework import fields, serializers
from taggit.serializers import TagListSerializerField

import importer.operations
from InvenTree.helpers import DownloadFile, GetExportFormats, current_date
Expand Down Expand Up @@ -81,6 +82,11 @@ def get_importable_fields(self) -> dict:
if issubclass(field.__class__, fields.FileField):
continue

# Skip tags fields
# TODO: Implement tag field support
if issubclass(field.__class__, TagListSerializerField):
continue

importable_fields[name] = field

return importable_fields
Expand Down
4 changes: 2 additions & 2 deletions src/backend/InvenTree/stock/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ class StockItemSerializer(

export_only_fields = ['part_pricing_min', 'part_pricing_max']

import_exclude_fields = ['use_pack_size', 'tags']
import_exclude_fields = ['use_pack_size']

class Meta:
"""Metaclass options."""
Expand Down Expand Up @@ -1142,7 +1142,7 @@ class LocationSerializer(
):
"""Detailed information about a stock location."""

import_exclude_fields = ['tags']
import_exclude_fields = []

class Meta:
"""Metaclass options."""
Expand Down