Commit 54d9cd4d by Stephan Groß

fixed validationerror usage

parent 497da7fc
...@@ -581,7 +581,7 @@ class HyperlinkedRelatedField(RelatedField): ...@@ -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): ...@@ -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 #####
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment