mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-23 01:57:00 +03:00
fixed validationerror usage
This commit is contained in:
parent
497da7fc69
commit
54d9cd4dba
|
@ -581,7 +581,7 @@ class HyperlinkedRelatedField(RelatedField):
|
||||||
except:
|
except:
|
||||||
pass
|
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):
|
def from_native(self, value):
|
||||||
# Convert URL -> model instance pk
|
# Convert URL -> model instance pk
|
||||||
|
@ -680,7 +680,7 @@ class HyperlinkedIdentityField(Field):
|
||||||
except:
|
except:
|
||||||
pass
|
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 #####
|
##### Typed Fields #####
|
||||||
|
|
Loading…
Reference in New Issue
Block a user