diff --git a/.github/workflows/qc_checks.yaml b/.github/workflows/qc_checks.yaml index 4df9d58812..12be395d76 100644 --- a/.github/workflows/qc_checks.yaml +++ b/.github/workflows/qc_checks.yaml @@ -446,6 +446,13 @@ jobs: chmod +rw /home/runner/work/InvenTree/db.sqlite3 invoke migrate + - name: 0.13.5 Database + run: | + rm /home/runner/work/InvenTree/db.sqlite3 + cp test-db/stable_0.13.5.sqlite3 /home/runner/work/InvenTree/db.sqlite3 + chmod +rw /home/runner/work/InvenTree/db.sqlite3 + invoke migrate + platform_ui: name: Tests - Platform UI runs-on: ubuntu-20.04 diff --git a/InvenTree/InvenTree/serializers.py b/InvenTree/InvenTree/serializers.py index 364d124c03..4745647ea5 100644 --- a/InvenTree/InvenTree/serializers.py +++ b/InvenTree/InvenTree/serializers.py @@ -25,7 +25,6 @@ from taggit.serializers import TaggitSerializer import common.models as common_models from common.settings import currency_code_default, currency_code_mappings from InvenTree.fields import InvenTreeRestURLField, InvenTreeURLField -from InvenTree.helpers_model import download_image_from_url, get_base_url class EmptySerializer(serializers.Serializer): @@ -455,6 +454,8 @@ class UserCreateSerializer(ExendedUserSerializer): def create(self, validated_data): """Send an e email to the user after creation.""" + from InvenTree.helpers_model import get_base_url + base_url = get_base_url() instance = super().create(validated_data) @@ -860,6 +861,8 @@ class RemoteImageMixin(metaclass=serializers.SerializerMetaclass): - Attempt to download the image and store it against this object instance - Catches and re-throws any errors """ + from InvenTree.helpers_model import download_image_from_url + if not url: return