Merge branch 'master' into 4-mongodb_api
This commit is contained in:
commit
b79a62d483
@ -57,7 +57,7 @@ class DropboxService(StorageServiceInterface):
|
|||||||
:param filename: filename
|
:param filename: filename
|
||||||
:return: bytes representation of the file or None on error
|
:return: bytes representation of the file or None on error
|
||||||
"""
|
"""
|
||||||
file_bytes: bytes
|
file_bytes: bytes = None
|
||||||
try:
|
try:
|
||||||
dbx = dropbox.Dropbox(settings.DROPBOX_OAUTH2_ACCESS_TOKEN)
|
dbx = dropbox.Dropbox(settings.DROPBOX_OAUTH2_ACCESS_TOKEN)
|
||||||
f: requests.models.Response
|
f: requests.models.Response
|
||||||
|
|||||||
@ -69,7 +69,7 @@ class ImageEndpoint:
|
|||||||
return JsonResponse({'valid': False, 'available': True})
|
return JsonResponse({'valid': False, 'available': True})
|
||||||
|
|
||||||
if no_image:
|
if no_image:
|
||||||
JsonResponse({'valid': False, 'available': False})
|
return JsonResponse({'valid': False, 'available': False})
|
||||||
|
|
||||||
return JsonResponse({'valid': True, 'available': True})
|
return JsonResponse({'valid': True, 'available': True})
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user