(self, sketch_id, datasource_id)
Verify and abort if unable to proceed.

        This function aborts if the ACLs on the sketch are not sufficient and
        the data source does not belong to the sketch in question.
Verify and abort if unable to proceed.
Verify and abort if unable to proceed .
def _verify_sketch_and_datasource(self, sketch_id, datasource_id):
        """Verify and abort if unable to proceed.

        This function aborts if the ACLs on the sketch are not sufficient and
        the data source does not belong to the sketch in question.
        """
        sketch = Sketch.query.get_with_acl(sketch_id)
        if not sketch:
            abort(
                HTTP_STATUS_CODE_NOT_FOUND,
                'No sketch found with this ID.')

        if sketch.get_status.status == 'archived':
            abort(
                HTTP_STATUS_CODE_BAD_REQUEST,
                'Unable to fetch data sources from an archived sketch.')

        data_source = DataSource.query.get(datasource_id)
        if not data_source:
            abort(
                HTTP_STATUS_CODE_NOT_FOUND,
                'No DataSource found with this ID.')


        if data_source.timeline.sketch.id != sketch.id:
            abort(
                HTTP_STATUS_CODE_BAD_REQUEST,
                'Data Source does not match the Sketch ID.')
def _verify_sketch_and_datasource ( self , sketch_id , datasource_id ) : sketch = Sketch . query . get_with_acl ( sketch_id ) if not sketch : abort ( HTTP_STATUS_CODE_NOT_FOUND , 'No sketch found with this ID.' ) if sketch . get_status . status == 'archived' : abort ( HTTP_STATUS_CODE_BAD_REQUEST , 'Unable to fetch data sources from an archived sketch.' ) data_source = DataSource . query . get ( datasource_id ) if not data_source : abort ( HTTP_STATUS_CODE_NOT_FOUND , 'No DataSource found with this ID.' ) if data_source . timeline . sketch . id != sketch . id : abort ( HTTP_STATUS_CODE_BAD_REQUEST , 'Data Source does not match the Sketch ID.' )