mirror of
https://github.com/inventree/InvenTree.git
synced 2026-09-01 01:31:28 +00:00
Merge branch 'master' into block-notes
This commit is contained in:
+2
-2
@@ -4,10 +4,10 @@ import json
|
||||
import os
|
||||
import re
|
||||
from datetime import datetime
|
||||
from distutils.version import StrictVersion # type: ignore[import]
|
||||
from pathlib import Path
|
||||
|
||||
import requests
|
||||
from packaging.version import Version
|
||||
|
||||
here = Path(__file__).parent
|
||||
|
||||
@@ -57,7 +57,7 @@ def fetch_rtd_versions():
|
||||
print('No RTD token found - skipping RTD version fetch')
|
||||
|
||||
# Sort versions by version number
|
||||
versions = sorted(versions, key=lambda x: StrictVersion(x['version']), reverse=True)
|
||||
versions = sorted(versions, key=lambda x: Version(x['version']), reverse=True)
|
||||
|
||||
# Add "latest" version first
|
||||
if not any(x['title'] == 'latest' for x in versions):
|
||||
|
||||
@@ -54,14 +54,14 @@ class InvenTreeBarcodePlugin(BarcodeMixin, InvenTreePlugin):
|
||||
VERSION = "0.0.1"
|
||||
AUTHOR = "Michael"
|
||||
|
||||
def scan(self, barcode_data):
|
||||
def scan(self, barcode_data, user, **kwargs):
|
||||
if barcode_data.startswith("PART-"):
|
||||
try:
|
||||
pk = int(barcode_data.split("PART-")[1])
|
||||
instance = Part.objects.get(pk=pk)
|
||||
label = Part.barcode_model_type()
|
||||
|
||||
return {label: instance.format_matched_response()}
|
||||
return {label: instance.format_matched_response(user=user)}
|
||||
except Part.DoesNotExist:
|
||||
pass
|
||||
```
|
||||
|
||||
@@ -325,7 +325,7 @@ ARG INVENTREE_TAG
|
||||
|
||||
# prebuild stage - needs a lot of build dependencies
|
||||
# make sure, the alpine and python version matches the version used in the inventree base image
|
||||
FROM python:3.11-alpine3.18 as prebuild
|
||||
FROM python:3.12-alpine3.18 as prebuild
|
||||
|
||||
# Install whatever development dependency is needed (e.g. cups-dev, gcc, the musl-dev build tools and the pip pycups package)
|
||||
RUN apk add --no-cache cups-dev gcc musl-dev && \
|
||||
|
||||
+1
-1
@@ -367,7 +367,7 @@ extra:
|
||||
# provider: google
|
||||
# property: UA-143467500-1
|
||||
|
||||
min_python_version: 3.11
|
||||
min_python_version: 3.12
|
||||
min_invoke_version: 2.0.0
|
||||
django_version: 5.2
|
||||
docker_postgres_version: 17
|
||||
|
||||
Reference in New Issue
Block a user