mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-22 17:47:04 +03:00
assert package requirements are met for YAMLRenderer
This commit is contained in:
parent
b3019d9824
commit
3357a36e37
|
@ -168,6 +168,8 @@ class YAMLRenderer(BaseRenderer):
|
|||
"""
|
||||
Renders *obj* into serialized YAML.
|
||||
"""
|
||||
assert yaml, 'YAMLRenderer requires pyyaml to be installed'
|
||||
|
||||
if data is None:
|
||||
return ''
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user