Fix state check for empty collections

This commit is contained in:
mvdbeek
2020-11-14 17:54:22 +01:00
parent 39c7c3dfd4
commit a2c83ee722
+4 -2
View File
@@ -4008,8 +4008,10 @@ class DatasetCollection(Dictifiable, UsesAnnotations, RepresentById):
extensions = set()
states = set()
for extension, state in db_session.execute(select_stmt).fetchall():
states.add(state)
extensions.add(extension)
if state is not None:
# query may return (None, None) if not collection elements present
states.add(state)
extensions.add(extension)
self._dataset_states_and_extensions_summary = (states, extensions)