mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-11-03 22:55:43 +00:00 
			
		
		
		
	Fix persist buttons (#4640)
Fixes "persist form" buttons for the following models: - Part - PartCategory - StockItem - StockLocation Closes https://github.com/inventree/InvenTree/issues/4491
This commit is contained in:
		@@ -334,18 +334,8 @@
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    $("#cat-create").click(function() {
 | 
			
		||||
 | 
			
		||||
        var fields = categoryFields();
 | 
			
		||||
 | 
			
		||||
        {% if category %}
 | 
			
		||||
        fields.parent.value = {{ category.pk }};
 | 
			
		||||
        {% endif %}
 | 
			
		||||
 | 
			
		||||
        constructForm('{% url "api-part-category-list" %}', {
 | 
			
		||||
            fields: fields,
 | 
			
		||||
            method: 'POST',
 | 
			
		||||
            title: '{% trans "Create Part Category" %}',
 | 
			
		||||
            follow: true,
 | 
			
		||||
        createPartCategory({
 | 
			
		||||
            {% if category %}parent: {{ category.pk }},{% endif %}
 | 
			
		||||
        });
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user