aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--rest_framework/relations.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/rest_framework/relations.py b/rest_framework/relations.py
index 3aaf6648..c4271e33 100644
--- a/rest_framework/relations.py
+++ b/rest_framework/relations.py
@@ -448,7 +448,7 @@ class HyperlinkedRelatedField(RelatedField):
raise Exception('Writable related fields must include a `queryset` argument')
try:
- http_prefix = value.startswith('http:') or value.startswith('https:')
+ http_prefix = value.startswith(('http:', 'https:'))
except AttributeError:
msg = self.error_messages['incorrect_type']
raise ValidationError(msg % type(value).__name__)