figures/sites.py
def site_to_id(site):
    """
    Helper to cast site or site id to id
    This is helpful for celery tasks that require primitives for
    function parameters
    """
    if isinstance(site, Site):
        return site.id
    else:
        return site

    Helper to cast site or site id to id
    This is helpful for celery tasks that require primitives for
    function parameters
    
Helper to cast site or site id to id
This is helpful for celery tasks that require primitives for
function parameters
Helper to cast site or site id to id This is helpful for celery tasks that require primitives for function parameters
def site_to_id(site):
    if isinstance(site, Site):
        return site.id
    else:
        return site
def site_to_id ( site ) : if isinstance ( site , Site ) : return site . id else : return site
Helper to cast site or site id to id
This is helpful for celery tasks that require primitives for
function parameters
Helper to cast site or site id to id This is helpful for celery tasks that require primitives for function parameters
"""
    Helper to cast site or site id to id
    This is helpful for celery tasks that require primitives for
    function parameters
    """
site