def image():
    """ RESTful CRUD controller """

    # Pre-processor
    def prep(r):
        # Location Filter
        s3db.gis_location_filter(r)

        if ("create", "create.popup") in r.method:
            doc_id = get_vars.get("~.doc_id", None)
            if doc_id:
                # Coming from Profile page
                s3db.doc_image.doc_id.default = doc_id

        return True
    s3.prep = prep

    output = s3_rest_controller()
    return output

# =============================================================================
dataset/ETHPy150Open sahana/eden/controllers/doc.py/image/swapped operands of `in`