api/schemas/collab.py
def collab_from(query: Union[CollabModel, CollabQuery]) -> Collab:
    """Function for getting a Collab object based on a query."""
    q = dict(query)

    if not BaseCollab.exists(q):
        raise ValueError('Collab does not exist.')

    doc: Document = BaseCollab.find(q, unhash = True, remove_id = True)

    return Collab(**doc, create = False)
Function for getting a Collab object based on a query.
Function for getting a Collab object based on a query.
Function for getting a Collab object based on a query .
def collab_from(query: Union[CollabModel, CollabQuery]) -> Collab:
    q = dict(query)
    if not BaseCollab.exists(q):
        raise ValueError('Collab does not exist.')
    doc: Document = BaseCollab.find(q, unhash = True, remove_id = True)
    return Collab(**doc, create = False)
def collab_from ( query : Union [ CollabModel , CollabQuery ] ) -> Collab : q = dict ( query ) if not BaseCollab . exists ( q ) : raise ValueError ( 'Collab does not exist.' ) doc : Document = BaseCollab . find ( q , unhash = True , remove_id = True ) return Collab ( ** doc , create = False )
Function for getting a Collab object based on a query.
Function for getting a Collab object based on a query .
"""Function for getting a Collab object based on a query."""
query
Union[CollabModel, CollabQuery]