Commit 50f46124 by Marko Tibold

Merge pull request #502 from minddust/minor_fixes_02

fixed validationerror usage
parents 19da4282 54d9cd4d
...@@ -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