Fixed ds name access

pull/1122/head
Luca Di Leo 2022-01-14 08:49:26 -08:00
rodzic 6978584bdb
commit 5087145c96
1 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -1,3 +1,4 @@
from functools import reduce
import requests
from os import path
from app.plugins import logger
@ -109,11 +110,10 @@ class DroneDB:
try:
response = self.wrapped_call('GET', self.__get_datasets_url.format(orgSlug))
return [
{'slug': o['slug'],
# Maybe add a null check
'name': o['properties']['meta']['name']['data'],
'name': o['properties'].get('meta', {}).get('name', {}).get('data', o['name']),
'public': o['properties'].get('public'),
'size': o['size'],
'entries': o['properties'].get('entries')