def _validate_table(self, term):
        """
        Returns False if the term references a table not already part of the
        FROM clause or JOINS and True otherwise.
        """
        base_tables = self._from + [self._update_table]

        for field in term.fields():
            table_in_base_tables = field.table in base_tables
            table_in_joins = field.table in [join.item for join in self._joins]
            if field.table is not None \
                  and not table_in_base_tables \
                  and not table_in_joins \
                  and field.table != self._update_table:
                return False
        return True
def _validate_table ( self , term ) : base_tables = self . _from + [ self . _update_table ] for field in term . fields ( ) : table_in_base_tables = field . table in base_tables table_in_joins = field . table in [ join . item for join in self . _joins ] if field . table is not None and not table_in_base_tables and not table_in_joins and field . table != self . _update_table : return False return True
Returns False if the term references a table not already part of the
        FROM clause or JOINS and True otherwise.