mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-11-04 07:05:41 +00:00 
			
		
		
		
	[CI] DB Migration Checks (#6517)
* Update imports - Help prevent circular imports * Run migration checks against 0.13.5
This commit is contained in:
		
							
								
								
									
										7
									
								
								.github/workflows/qc_checks.yaml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										7
									
								
								.github/workflows/qc_checks.yaml
									
									
									
									
										vendored
									
									
								
							@@ -446,6 +446,13 @@ jobs:
 | 
				
			|||||||
          chmod +rw /home/runner/work/InvenTree/db.sqlite3
 | 
					          chmod +rw /home/runner/work/InvenTree/db.sqlite3
 | 
				
			||||||
          invoke migrate
 | 
					          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:
 | 
					  platform_ui:
 | 
				
			||||||
    name: Tests - Platform UI
 | 
					    name: Tests - Platform UI
 | 
				
			||||||
    runs-on: ubuntu-20.04
 | 
					    runs-on: ubuntu-20.04
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -25,7 +25,6 @@ from taggit.serializers import TaggitSerializer
 | 
				
			|||||||
import common.models as common_models
 | 
					import common.models as common_models
 | 
				
			||||||
from common.settings import currency_code_default, currency_code_mappings
 | 
					from common.settings import currency_code_default, currency_code_mappings
 | 
				
			||||||
from InvenTree.fields import InvenTreeRestURLField, InvenTreeURLField
 | 
					from InvenTree.fields import InvenTreeRestURLField, InvenTreeURLField
 | 
				
			||||||
from InvenTree.helpers_model import download_image_from_url, get_base_url
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class EmptySerializer(serializers.Serializer):
 | 
					class EmptySerializer(serializers.Serializer):
 | 
				
			||||||
@@ -455,6 +454,8 @@ class UserCreateSerializer(ExendedUserSerializer):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    def create(self, validated_data):
 | 
					    def create(self, validated_data):
 | 
				
			||||||
        """Send an e email to the user after creation."""
 | 
					        """Send an e email to the user after creation."""
 | 
				
			||||||
 | 
					        from InvenTree.helpers_model import get_base_url
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        base_url = get_base_url()
 | 
					        base_url = get_base_url()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        instance = super().create(validated_data)
 | 
					        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
 | 
					        - Attempt to download the image and store it against this object instance
 | 
				
			||||||
        - Catches and re-throws any errors
 | 
					        - Catches and re-throws any errors
 | 
				
			||||||
        """
 | 
					        """
 | 
				
			||||||
 | 
					        from InvenTree.helpers_model import download_image_from_url
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if not url:
 | 
					        if not url:
 | 
				
			||||||
            return
 | 
					            return
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user