# HG changeset patch
# User davideklund <daek@kth.se>
# Date 1324472255 -3600
# Node ID 3c78018af52745775c830aadd4d75132a45bff03
# Parent  2a2abbcad325ccca9399981ceddf5897eb467e64
Trac 12211: Fix bug in _check_satisfies_equations.

diff -r 2a2abbcad325 -r 3c78018af527 sage/schemes/generic/algebraic_scheme.py
--- a/sage/schemes/generic/algebraic_scheme.py	Thu Aug 11 12:52:48 2011 +0000
+++ b/sage/schemes/generic/algebraic_scheme.py	Wed Dec 21 13:57:35 2011 +0100
@@ -750,9 +750,9 @@
             if f(coords) != 0:
                 raise TypeError, "Coordinates %s do not define a point on %s"%(v,self)
         for f in self.__Y.defining_polynomials():
-            if f(coords) == 0:
-                raise TypeError, "Coordinates %s do not define a point on %s"%(v,self)
-        return True
+            if f(coords) != 0:
+                return True
+        raise TypeError, "Coordinates %s do not define a point on %s"%(v,self)
 
     def rational_points(self, F=None, bound=0):
         """
