mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-31 21:25:42 +00:00 
			
		
		
		
	Ensure correct path separator is returned
This commit is contained in:
		| @@ -89,7 +89,16 @@ class ReportTemplateBase(models.Model): | ||||
|  | ||||
|     @property | ||||
|     def template_name(self): | ||||
|         return os.path.join('report_template', self.getSubdir(), os.path.basename(self.template.name)) | ||||
|         """ | ||||
|         Returns the file system path to the template file. | ||||
|         Required for passing the file to an external process (e.g. LaTeX) | ||||
|         """ | ||||
|  | ||||
|         template = os.path.join('report_template', self.getSubdir(), os.path.basename(self.template.name)) | ||||
|         template = template.replace('/', os.path.sep) | ||||
|         template = template.replace('\\', os.path.sep) | ||||
|  | ||||
|         return template | ||||
|  | ||||
|     def get_context_data(self, request): | ||||
|         """ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user