mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-30 20:55:42 +00:00 
			
		
		
		
	Catch for null value for settings choices
This commit is contained in:
		| @@ -34,11 +34,14 @@ class SettingsSerializer(InvenTreeModelSerializer): | ||||
|  | ||||
|         results = [] | ||||
|  | ||||
|         for choice in obj.choices(): | ||||
|             results.append({ | ||||
|                 'value': choice[0], | ||||
|                 'display_name': choice[1], | ||||
|             }) | ||||
|         choices = obj.choices() | ||||
|  | ||||
|         if choices: | ||||
|             for choice in choices: | ||||
|                 results.append({ | ||||
|                     'value': choice[0], | ||||
|                     'display_name': choice[1], | ||||
|                 }) | ||||
|  | ||||
|         return results | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user