Compare commits

...

6 Commits

Author SHA1 Message Date
github-actions[bot]
35fc954ff8 Fix for registering scheduled tasks (#6815) (#6816)
- Closes https://github.com/inventree/InvenTree/issues/6793

(cherry picked from commit 9576b50152)

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
2024-03-22 22:15:59 +11:00
github-actions[bot]
ac83318081 Fix docs: Remove INVENTREE_BASE_URL (#6757) (#6759)
- Actual name is INVENTREE_SITE_URL
- Ref: https://github.com/inventree/InvenTree/discussions/6751

(cherry picked from commit 45ecebaf19)

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
2024-03-20 10:54:35 +11:00
Oliver
acfd39258b Fix PUI build workflow (#6754) (#6758)
* Fix PUI build workflow

* Fix PUI build release workflow

Co-authored-by: Lukas <76838159+wolflu05@users.noreply.github.com>
2024-03-20 10:51:15 +11:00
github-actions[bot]
0287bf78e4 Bump django from 4.2.10 to 4.2.11 (#6745) (#6748)
* Bump django from 4.2.10 to 4.2.11

Bumps [django](https://github.com/django/django) from 4.2.10 to 4.2.11.
- [Commits](https://github.com/django/django/compare/4.2.10...4.2.11)

---
updated-dependencies:
- dependency-name: django
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix dep

* remove version id

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Matthias Mair <code@mjmair.com>
(cherry picked from commit 7811ba5578)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-19 10:32:34 +11:00
github-actions[bot]
f8d6fed06e Error handling fix (#6741) (#6744)
* Handle case where error message is *not* a dict

* Encode as list

(cherry picked from commit ca8f0cee9f)

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
2024-03-18 23:09:23 +11:00
Oliver
beca269e3a Update version.py (#6737) 2024-03-18 13:22:28 +11:00
9 changed files with 21 additions and 11 deletions

View File

@@ -505,7 +505,7 @@ jobs:
- name: Install dependencies
run: cd src/frontend && yarn install
- name: Build frontend
run: cd src/frontend && npm run build
run: cd src/frontend && npm run compile && npm run build
- name: Zip frontend
run: |
cd InvenTree/web/static

View File

@@ -37,7 +37,7 @@ jobs:
- name: Install dependencies
run: cd src/frontend && yarn install
- name: Build frontend
run: cd src/frontend && npm run build
run: cd src/frontend && npm run compile && npm run build
- name: Zip frontend
run: |
cd InvenTree/web/static/web

View File

@@ -352,7 +352,12 @@ class InvenTreeModelSerializer(serializers.ModelSerializer):
try:
instance.full_clean()
except (ValidationError, DjangoValidationError) as exc:
data = exc.message_dict
if hasattr(exc, 'message_dict'):
data = exc.message_dict
elif hasattr(exc, 'message'):
data = {'non_field_errors': [str(exc.message)]}
else:
data = {'non_field_errors': [str(exc)]}
# Change '__all__' key (django style) to 'non_field_errors' (DRF style)
if '__all__' in data:

View File

@@ -19,7 +19,7 @@ from dulwich.repo import NotGitRepository, Repo
from .api_version import INVENTREE_API_TEXT, INVENTREE_API_VERSION
# InvenTree software version
INVENTREE_SW_VERSION = '0.14.3'
INVENTREE_SW_VERSION = '0.14.4'
# Discover git
try:

View File

@@ -112,7 +112,7 @@ class ScheduleMixin:
@property
def has_scheduled_tasks(self):
"""Are tasks defined for this plugin."""
return bool(self.scheduled_tasks)
return bool(self.get_scheduled_tasks())
def validate_scheduled_tasks(self):
"""Check that the provided scheduled tasks are valid."""

View File

@@ -138,7 +138,13 @@ class MixinBase:
if fnc_name is True:
return True
return getattr(self, fnc_name, True)
attr = getattr(self, fnc_name, True)
if callable(attr):
return attr()
else:
return attr
return False
def add_mixin(self, key: str, fnc_enabled=True, cls=None):

View File

@@ -56,7 +56,6 @@ The following basic options are available:
| INVENTREE_ADMIN_ENABLED | admin_enabled | Enable the [django administrator interface]({% include "django.html" %}/ref/contrib/admin/) | True |
| INVENTREE_ADMIN_URL | admin_url | URL for accessing [admin interface](../settings/admin.md) | admin |
| INVENTREE_LANGUAGE | language | Default language | en-us |
| INVENTREE_BASE_URL | base_url | Server base URL | *Not specified* |
| INVENTREE_AUTO_UPDATE | auto_update | Database migrations will be run automatically | False |
## Server Access

View File

@@ -23,7 +23,7 @@ cryptography==42.0.4
# via pdfminer-six
distlib==0.3.8
# via virtualenv
django==4.2.10
django==4.2.11
# via django-slowtests
django-slowtests==1.1.1
django-test-migrations==1.3.0
@@ -57,7 +57,7 @@ pyyaml==6.0.1
# via pre-commit
requests==2.31.0
# via coveralls
setuptools==69.1.0
setuptools==69.2.0
# via
# nodeenv
# pip-tools

View File

@@ -52,7 +52,7 @@ deprecated==1.2.14
diff-match-patch==20230430
# via django-import-export
dj-rest-auth==5.0.2
django==4.2.10
django==4.2.11
# via
# dj-rest-auth
# django-allauth
@@ -296,7 +296,7 @@ rpds-py==0.17.1
# referencing
sentry-sdk==1.40.0
# via django-q-sentry
setuptools==69.1.0
setuptools==69.2.0
# via
# django-money
# opentelemetry-instrumentation