mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-31 05:05:42 +00:00 
			
		
		
		
	Prevent operations on null dates
This commit is contained in:
		| @@ -53,6 +53,9 @@ def render_date(context, date_object): | |||||||
|     which differs from the python formatting! |     which differs from the python formatting! | ||||||
|     """ |     """ | ||||||
|  |  | ||||||
|  |     if date_object is None: | ||||||
|  |         return None | ||||||
|  |  | ||||||
|     if type(date_object) == str: |     if type(date_object) == str: | ||||||
|         # If a string is passed, first convert it to a datetime |         # If a string is passed, first convert it to a datetime | ||||||
|         date_object = date.fromisoformat(date_object) |         date_object = date.fromisoformat(date_object) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user