improve handling of missing fields
This commit is contained in:
		
							parent
							
								
									c3afa11013
								
							
						
					
					
						commit
						19e6e0f191
					
				
					 1 changed files with 7 additions and 3 deletions
				
			
		|  | @ -71,7 +71,11 @@ def build_urls(fields): | |||
|                              my_config.get(section, url + '.pattern', | ||||
|                                            False, qfields)]) | ||||
|                     except InterpolationMissingOptionError, e: | ||||
|                         data.append(['error', section, url, | ||||
|                                      _('Missing input: %s') % \ | ||||
|                                          _(_FIELDNAMES_MAP[e.reference])]) | ||||
|                         if e.reference in _FIELDNAMES_MAP: | ||||
|                             data.append(['error', section, url, | ||||
|                                          _('Missing input: %s') % \ | ||||
|                                              _(_FIELDNAMES_MAP[e.reference])]) | ||||
|                         else: | ||||
|                             data.append(['error', section, url, | ||||
|                                          _('Missing input: %s') % e.reference]) | ||||
|     return data | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue