models/models/sequence.py
def from_db(d: Dict):
        """Take DB mapping object, and return SampleSequencing"""
        type_ = d.pop('type')
        status = d.pop('status')
        meta = d.pop('meta', None)

        if type_:
            type_ = SequenceType(type_)
        if status:
            status = SequenceStatus(status)

        if meta:
            if isinstance(meta, bytes):
                meta = meta.decode()
            if isinstance(meta, str):
                meta = json.loads(meta)
        return SampleSequencing(type=type_, status=status, meta=meta, **d)
Take DB mapping object, and return SampleSequencing
Take DB mapping object, and return SampleSequencing
Take DB mapping object and return SampleSequencing
def from_db(d: Dict):
        type_ = d.pop('type')
        status = d.pop('status')
        meta = d.pop('meta', None)
        if type_:
            type_ = SequenceType(type_)
        if status:
            status = SequenceStatus(status)
        if meta:
            if isinstance(meta, bytes):
                meta = meta.decode()
            if isinstance(meta, str):
                meta = json.loads(meta)
        return SampleSequencing(type=type_, status=status, meta=meta, **d)
def from_db ( d : Dict ) : type_ = d . pop ( 'type' ) status = d . pop ( 'status' ) meta = d . pop ( 'meta' , None ) if type_ : type_ = SequenceType ( type_ ) if status : status = SequenceStatus ( status ) if meta : if isinstance ( meta , bytes ) : meta = meta . decode ( ) if isinstance ( meta , str ) : meta = json . loads ( meta ) return SampleSequencing ( type = type_ , status = status , meta = meta , ** d )
Take DB mapping object, and return SampleSequencing
Take DB mapping object and return SampleSequencing
"""Take DB mapping object, and return SampleSequencing"""
d
Dict