check if all fiels for the photo are in vcard
This commit is contained in:
		
							parent
							
								
									36a5469ccc
								
							
						
					
					
						commit
						9918b17e2f
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -137,7 +137,7 @@ class Vcard_window:
 | 
			
		|||
		for i in vcard.keys():
 | 
			
		||||
			if i == 'PHOTO':
 | 
			
		||||
				img_decoded = None
 | 
			
		||||
				if vcard[i].has_key('BINVAL'):
 | 
			
		||||
				if vcard[i].has_key('BINVAL') and vcard[i].has_key('TYPE'):
 | 
			
		||||
					img_encoded = vcard[i]['BINVAL']
 | 
			
		||||
					self.avatar_encoded = img_encoded
 | 
			
		||||
					self.avatar_mime_type = vcard[i]['TYPE']
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue