sregistry/database/sqlite.py
def get_container(self, name, collection_id, tag="latest", version=None):
    '''get a container, otherwise return None.
    '''
    from sregistry.database.models import Container
    if version is None:
        container = Container.query.filter_by(collection_id = collection_id,
                                              name = name,
                                              tag = tag).first()
    else:
        container = Container.query.filter_by(collection_id = collection_id,
                                              name = name,
                                              tag = tag,
                                              version = version).first()
    return container
def get_container(self, name, collection_id, tag="latest", version=None):
    '''get a container, otherwise return None.
    '''
    from sregistry.database.models import Container
    if version is None:
        container = Container.query.filter_by(collection_id = collection_id,
                                              name = name,
                                              tag = tag).first()
    else:
        container = Container.query.filter_by(collection_id = collection_id,
                                              name = name,
                                              tag = tag,
                                              version = version).first()
    return container
def get_container ( self , name , collection_id , tag = "latest" , version = None ) : from sregistry . database . models import Container if version is None : container = Container . query . filter_by ( collection_id = collection_id , name = name , tag = tag ) . first ( ) else : container = Container . query . filter_by ( collection_id = collection_id , name = name , tag = tag , version = version ) . first ( ) return container
get a container, otherwise return None.
get a container otherwise return None .