mirror of
				https://github.com/encode/django-rest-framework.git
				synced 2025-11-04 01:47:59 +03:00 
			
		
		
		
	Merge pull request #502 from minddust/minor_fixes_02
fixed validationerror usage
This commit is contained in:
		
						commit
						50f4612404
					
				| 
						 | 
				
			
			@ -581,7 +581,7 @@ class HyperlinkedRelatedField(RelatedField):
 | 
			
		|||
        except:
 | 
			
		||||
            pass
 | 
			
		||||
 | 
			
		||||
        raise ValidationError('Could not resolve URL for field using view name "%s"', view_name)
 | 
			
		||||
        raise ValidationError('Could not resolve URL for field using view name "%s"' % view_name)
 | 
			
		||||
 | 
			
		||||
    def from_native(self, value):
 | 
			
		||||
        # Convert URL -> model instance pk
 | 
			
		||||
| 
						 | 
				
			
			@ -680,7 +680,7 @@ class HyperlinkedIdentityField(Field):
 | 
			
		|||
        except:
 | 
			
		||||
            pass
 | 
			
		||||
 | 
			
		||||
        raise ValidationError('Could not resolve URL for field using view name "%s"', view_name)
 | 
			
		||||
        raise ValidationError('Could not resolve URL for field using view name "%s"' % view_name)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
##### Typed Fields #####
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user