mirror of
				https://gitlab.crans.org/mediatek/med.git
				synced 2025-11-04 10:22:13 +01:00 
			
		
		
		
	If no day of month, set the first day of the month
This commit is contained in:
		@@ -147,6 +147,8 @@ class MediaAdminForm(ModelForm):
 | 
			
		||||
        if 'publishedDate' in info:
 | 
			
		||||
            if "-" not in info["publishedDate"]:
 | 
			
		||||
                info["publishedDate"] += "-01-01"
 | 
			
		||||
            elif len(info["publishedDate"]) == 7:
 | 
			
		||||
                info["publishedDate"] += "-01"
 | 
			
		||||
            self.cleaned_data['publish_date'] = info['publishedDate'][:10]
 | 
			
		||||
 | 
			
		||||
        if 'authors' not in self.cleaned_data \
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user