diff --git a/src/backend/InvenTree/InvenTree/api_version.py b/src/backend/InvenTree/InvenTree/api_version.py index bc0d0c5bcd..f198138e53 100644 --- a/src/backend/InvenTree/InvenTree/api_version.py +++ b/src/backend/InvenTree/InvenTree/api_version.py @@ -1,11 +1,14 @@ """InvenTree API version information.""" # InvenTree API version -INVENTREE_API_VERSION = 427 +INVENTREE_API_VERSION = 428 """Increment this API version number whenever there is a significant change to the API that any clients need to know about.""" INVENTREE_API_TEXT = """ +v428 -> 2025-11-28 : https://github.com/inventree/InvenTree/pull/10926 + - Various typo fixes in API - no functional changes + v427 -> 2025-11-24 : https://github.com/inventree/InvenTree/pull/10896 - Fixes a spelling mistake in the API field labels @@ -42,7 +45,7 @@ v418 -> 2025-10-24 : https://github.com/inventree/InvenTree/pull/10657 v417 -> 2025-10-22 : https://github.com/inventree/InvenTree/pull/10654 - Adds "checked" filter to SalesOrderShipment API endpoint - - Adds "order_status" filter to SalesOrdereShipment API endpoint + - Adds "order_status" filter to SalesOrderShipment API endpoint - Adds "order_outstanding" filter to SalesOrderShipment API endpoint v416 -> 2025-10-22 : https://github.com/inventree/InvenTree/pull/10651 @@ -100,7 +103,7 @@ v401 -> 2025-10-05 : https://github.com/inventree/InvenTree/pull/10381 - Adds machine properties to machine API endpoints v400 -> 2025-10-05 : https://github.com/inventree/InvenTree/pull/10486 - - Adds return datatypes for admin/config and flags entpoints + - Adds return datatypes for admin/config and flags endpoints v399 -> 2025-10-05 : https://github.com/inventree/InvenTree/pull/10445 - Refactors 'customer_detail' param in SalesOrder API endpoint diff --git a/src/backend/InvenTree/InvenTree/serializers.py b/src/backend/InvenTree/InvenTree/serializers.py index ee707f27ff..dd1e096de7 100644 --- a/src/backend/InvenTree/InvenTree/serializers.py +++ b/src/backend/InvenTree/InvenTree/serializers.py @@ -69,7 +69,7 @@ def enable_filter( Returns: The decorated serializer field, marked as filterable. """ - # Ensure this function can be actually filteres + # Ensure this function can be actually filtered if not issubclass(func.__class__, FilterableSerializerField): raise TypeError( 'INVE-I2: `enable_filter` can only be applied to serializer fields / serializers that contain the `FilterableSerializerField` mixin!' @@ -132,11 +132,11 @@ class FilterableSerializerMixin: query_params = dict(getattr(context.get('request', {}), 'query_params', {})) # Remove filter args from kwargs to avoid issues with super().__init__ - poped_kwargs = {} # store popped kwargs as a arg might be reused for multiple fields + popped_kwargs = {} # store popped kwargs as a arg might be reused for multiple fields tgs_vals: dict[str, bool] = {} for k, v in self.filter_targets.items(): pop_ref = v['filter_name'] or k - val = kwargs.pop(pop_ref, poped_kwargs.get(pop_ref)) + val = kwargs.pop(pop_ref, popped_kwargs.get(pop_ref)) # Optionally also look in query parameters if val is None and self.filter_on_query and v.get('filter_by_query', True): @@ -145,13 +145,13 @@ class FilterableSerializerMixin: val = val[0] if val: # Save popped value for reuse - poped_kwargs[pop_ref] = val + popped_kwargs[pop_ref] = val tgs_vals[k] = ( str2bool(val) if isinstance(val, (str, int, float)) else val ) # Support for various filtering style for backwards compatibility self.filter_target_values = tgs_vals - # Ensure this mixin is not proadly applied as it is expensive on scale (total CI time increased by 21% when running all coverage tests) + # Ensure this mixin is not broadly applied as it is expensive on scale (total CI time increased by 21% when running all coverage tests) if len(self.filter_targets) == 0 and not self.no_filters: raise Exception( 'INVE-I2: No filter targets found in fields, remove `PathScopedMixin`' diff --git a/src/backend/InvenTree/build/models.py b/src/backend/InvenTree/build/models.py index e4c89c5d63..32bf0a951b 100644 --- a/src/backend/InvenTree/build/models.py +++ b/src/backend/InvenTree/build/models.py @@ -85,7 +85,7 @@ class Build( InvenTree.models.MetadataMixin, InvenTree.models.InvenTreeTree, ): - """A Build object organises the creation of new StockItem objects from other existing StockItem objects. + """A Build object organizes the creation of new StockItem objects from other existing StockItem objects. Attributes: part: The part to be built (from component BOM items) diff --git a/src/backend/InvenTree/company/api.py b/src/backend/InvenTree/company/api.py index cde689119e..42a58fef79 100644 --- a/src/backend/InvenTree/company/api.py +++ b/src/backend/InvenTree/company/api.py @@ -366,7 +366,7 @@ class SupplierPartMixin: serializer_class = SupplierPartSerializer def get_queryset(self, *args, **kwargs): - """Return annotated queryest object for the SupplierPart list.""" + """Return annotated queryset object for the SupplierPart list.""" queryset = super().get_queryset(*args, **kwargs) queryset = SupplierPartSerializer.annotate_queryset(queryset) diff --git a/src/backend/InvenTree/company/models.py b/src/backend/InvenTree/company/models.py index c60e82900c..013a6b011b 100644 --- a/src/backend/InvenTree/company/models.py +++ b/src/backend/InvenTree/company/models.py @@ -297,7 +297,7 @@ class Contact(InvenTree.models.InvenTreeMetadataModel): @staticmethod def get_api_url(): - """Return the API URL associated with the Contcat model.""" + """Return the API URL associated with the Contact model.""" return reverse('api-contact-list') company = models.ForeignKey( @@ -382,7 +382,7 @@ class Address(InvenTree.models.InvenTreeModel): @staticmethod def get_api_url(): - """Return the API URL associated with the Contcat model.""" + """Return the API URL associated with the Contact model.""" return reverse('api-address-list') company = models.ForeignKey( @@ -888,7 +888,7 @@ class SupplierPart( ) def base_quantity(self, quantity=1) -> Decimal: - """Calculate the base unit quantiy for a given quantity.""" + """Calculate the base unit quantity for a given quantity.""" q = Decimal(quantity) * Decimal(self.pack_quantity_native) q = round(q, 10).normalize() diff --git a/src/backend/InvenTree/order/api.py b/src/backend/InvenTree/order/api.py index ddf7dadb57..05f848f518 100644 --- a/src/backend/InvenTree/order/api.py +++ b/src/backend/InvenTree/order/api.py @@ -1323,7 +1323,7 @@ class SalesOrderAllocationList( class SalesOrderAllocationDetail(SalesOrderAllocationMixin, RetrieveUpdateDestroyAPI): - """API endpoint for detali view of a SalesOrderAllocation object.""" + """API endpoint for detail view of a SalesOrderAllocation object.""" class SalesOrderShipmentFilter(FilterSet): @@ -1374,7 +1374,7 @@ class SalesOrderShipmentFilter(FilterSet): ) def filter_order_status(self, queryset, name, value): - """Filter by linked SalesOrderrder status.""" + """Filter by linked SalesOrder status.""" q1 = Q(order__status=value, order__status_custom_key__isnull=True) q2 = Q(order__status_custom_key=value) @@ -1412,7 +1412,7 @@ class SalesOrderShipmentList(SalesOrderShipmentMixin, ListCreateAPI): class SalesOrderShipmentDetail(SalesOrderShipmentMixin, RetrieveUpdateDestroyAPI): - """API detail endpooint for SalesOrderShipment model.""" + """API detail endpoint for SalesOrderShipment model.""" class SalesOrderShipmentComplete(CreateAPI): @@ -1964,7 +1964,7 @@ order_api_urls = [ ), ]), ), - # API endpoints for sales ordesr + # API endpoints for sales orders path( 'so/', include([ diff --git a/src/backend/InvenTree/order/models.py b/src/backend/InvenTree/order/models.py index 4efa189e71..3030ade4fb 100644 --- a/src/backend/InvenTree/order/models.py +++ b/src/backend/InvenTree/order/models.py @@ -988,7 +988,7 @@ class PurchaseOrder(TotalPriceMixin, Order): # Before we continue, validate that each line item is valid # We validate this here because it is far more efficient, - # after we have fetched *all* line itemes in a single DB query + # after we have fetched *all* line items in a single DB query for line_item in line_item_map.values(): if line_item.order != self: raise ValidationError({_('Line item does not match purchase order')}) diff --git a/src/backend/InvenTree/part/models.py b/src/backend/InvenTree/part/models.py index e02602a90c..18840608fb 100644 --- a/src/backend/InvenTree/part/models.py +++ b/src/backend/InvenTree/part/models.py @@ -1027,7 +1027,7 @@ class Part( self.ensure_trackable() def ensure_trackable(self): - """Ensure that trackable is set correctly downline.""" + """Ensure that trackable is set correctly downstream.""" if self.trackable: for part in self.get_used_in(): if not part.trackable: