forked from jgrewe/fishbook
[fishbook/dataset] fix constructor when passing the dataset_id
This commit is contained in:
parent
b009cf673a
commit
3db309b6f1
@ -2,7 +2,7 @@ from .database.database import Cells, Datasets, CellDatasetMap, Subjects, Subjec
|
||||
import nixio as nix
|
||||
import os
|
||||
import numpy as np
|
||||
# from IPython import embed
|
||||
from IPython import embed
|
||||
|
||||
|
||||
def _safe_get_val(dictionary:dict, key, default=None):
|
||||
@ -98,7 +98,7 @@ class Dataset:
|
||||
pattern = "dataset_id like '{0:s}'".format(dataset_id)
|
||||
dsets = (Datasets & pattern)
|
||||
_results_check(dsets, dataset_id, "Dataset ID")
|
||||
self.__tuple = dsets.fetch(limit=1)[0]
|
||||
self.__tuple = dsets.fetch(limit=1, as_dict=True)[0]
|
||||
else:
|
||||
print("Empty dataset, not linked to any database entry!")
|
||||
if len(self.__tuple.keys()) > 0:
|
||||
|
Loading…
Reference in New Issue
Block a user