Merge pull request #3823 from ostcar/fix_empty_data_in_rest
fix empty values in rest
This commit is contained in:
commit
c3bc1487d7
@ -284,8 +284,8 @@ class Collection(Cachable):
|
|||||||
all_full_data = self.get_elements_from_db()
|
all_full_data = self.get_elements_from_db()
|
||||||
else:
|
else:
|
||||||
all_full_data = async_to_sync(element_cache.get_all_full_data)()
|
all_full_data = async_to_sync(element_cache.get_all_full_data)()
|
||||||
self.full_data = all_full_data[self.collection_string]
|
self.full_data = all_full_data.get(self.collection_string, [])
|
||||||
return self.full_data
|
return self.full_data # type: ignore
|
||||||
|
|
||||||
def as_list_for_user(self, user: Optional[CollectionElement]) -> List[Dict[str, Any]]:
|
def as_list_for_user(self, user: Optional[CollectionElement]) -> List[Dict[str, Any]]:
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user