Skip to content

Commit 41b3f36

Browse files
committed
Fix: Rename copy_image to copy_images in PartDetail and PartTable components
1 parent c082bbe commit 41b3f36

File tree

4 files changed

+5
-17
lines changed

4 files changed

+5
-17
lines changed

src/backend/InvenTree/common/helpers.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,3 @@ def generate_image(filename: str = 'test.png', fmt: str = 'PNG') -> ContentFile:
2222

2323
# Subdirectory for storing part images
2424
UPLOADED_IMAGE_DIR = 'images'
25-
26-
27-
# def get_part_image_directory() -> str:
28-
# """Return the directory where part images are stored.
29-
30-
# Returns:
31-
# str: Directory where part images are stored
32-
33-
# TODO: Future work may be needed here to support other storage backends, such as S3
34-
# """
35-
# part_image_directory = (Path(settings.MEDIA_ROOT) / UPLOADED_IMAGE_DIR).resolve()
36-
# part_image_directory.mkdir(parents=True, exist_ok=True)
37-
# return str(part_image_directory)

src/frontend/src/components/details/DetailsImage.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,8 +333,9 @@ function ImageActionButtons({
333333
downloadImage();
334334
},
335335
icon: <InvenTreeIcon icon='download' />,
336-
hidden: !editActions?.downloadImage
337-
// || !globalSettings.isSet('INVENTREE_DOWNLOAD_FROM_URL')
336+
hidden:
337+
!editActions?.downloadImage ||
338+
!globalSettings.isSet('INVENTREE_DOWNLOAD_FROM_URL')
338339
},
339340

340341
{

src/frontend/src/pages/part/PartDetail.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1062,7 +1062,7 @@ export default function PartDetail() {
10621062
value: part.pk,
10631063
hidden: true
10641064
},
1065-
copy_image: {
1065+
copy_images: {
10661066
value: true
10671067
},
10681068
copy_bom: {

src/frontend/src/tables/part/PartTable.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ export function PartListTable({
414414
value: selectedPart.pk,
415415
hidden: true
416416
},
417-
copy_image: {
417+
copy_images: {
418418
value: true
419419
},
420420
copy_bom: {

0 commit comments

Comments
 (0)