mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-31 05:05:42 +00:00 
			
		
		
		
	PSQL: Upper-case column names *must* be qualified with double-quotes
Ref: https://www.xspdf.com/resolution/53039249.html
This commit is contained in:
		| @@ -22,7 +22,7 @@ def reverse_association(apps, schema_editor): | ||||
|  | ||||
|     cursor = connection.cursor() | ||||
|  | ||||
|     response = cursor.execute("select id, MPN from part_supplierpart;") | ||||
|     response = cursor.execute('select id, "MPN" from part_supplierpart;') | ||||
|     supplier_parts = cursor.fetchall() | ||||
|  | ||||
|     # Exit if there are no SupplierPart objects | ||||
| @@ -105,7 +105,7 @@ def associate_manufacturers(apps, schema_editor): | ||||
|  | ||||
|     cursor = connection.cursor() | ||||
|  | ||||
|     response = cursor.execute("select id, MPN from part_supplierpart;") | ||||
|     response = cursor.execute(f'select id, "MPN" from part_supplierpart;') | ||||
|     supplier_parts = cursor.fetchall() | ||||
|  | ||||
|     # Exit if there are no SupplierPart objects | ||||
| @@ -317,7 +317,7 @@ def associate_manufacturers(apps, schema_editor): | ||||
|  | ||||
|     # Extract all SupplierPart objects from the database | ||||
|     cursor = connection.cursor() | ||||
|     response = cursor.execute("select id, MPN, SKU, manufacturer_id, manufacturer_name from part_supplierpart;") | ||||
|     response = cursor.execute('select id, "MPN", "SKU", manufacturer_id, manufacturer_name from part_supplierpart;') | ||||
|     results = cursor.fetchall() | ||||
|  | ||||
|     part_count = len(results) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user