'Returns the Operator\'s DAG if set, otherwise raises an error'

@property
def dag(self):

    if self.has_dag():
        return self._dag
    else:
        raise AirflowException(u'Operator    {}    has    not    been    assigned    to    a    DAG    yet'.format(self))
