treenode | fix CSRF token and saving text.
This commit is contained in:
		
							parent
							
								
									4de974cec0
								
							
						
					
					
						commit
						73a84002d1
					
				
					 2 changed files with 2 additions and 0 deletions
				
			
		|  | @ -74,6 +74,7 @@ class TextNodeWriteSerializer(serializers.ModelSerializer): | |||
| 
 | ||||
| 	def update(self,node,validated_data): | ||||
| 		node.text.na_web = validated_data.get('text').get('na_web') | ||||
| 		node.text.save() | ||||
| 		return node | ||||
| 
 | ||||
| 	class Meta: | ||||
|  |  | |||
|  | @ -88,6 +88,7 @@ export default { | |||
| 	mounted: function() { | ||||
| 		//console.log("mounted"); | ||||
| 		this.editorConfig.simpleUpload.headers['X-CSRFToken'] = this.getCookie('csrftoken'); | ||||
| 		axios.defaults.headers.common['X-CSRFToken'] = this.getCookie('csrftoken'); | ||||
| 		if (this.create){ | ||||
| 			this.currentText = ""; | ||||
| 			this.originalText = ""; | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue