web/views/magicsearch.py
changeset 10669 155c29e0ed1c
parent 9701 46c8d8701240
child 10699 9bad9e061932
--- a/web/views/magicsearch.py	Tue Sep 15 17:10:58 2015 +0200
+++ b/web/views/magicsearch.py	Fri Sep 18 14:29:53 2015 +0200
@@ -86,7 +86,7 @@
             else:
                 # Only one possible translation, no ambiguity
                 if len(translation_set) == 1:
-                    relation.r_type = iter(translations[rtype]).next()
+                    relation.r_type = next(iter(translations[rtype]))
                 # More than 1 possible translation => resolve it later
                 else:
                     ambiguous_nodes[relation] = (lhs.name, translation_set)
@@ -589,7 +589,7 @@
         """
         schema = self._cw.vreg.schema
         relations = set()
-        untyped_dest_var = rqlvar_maker(defined=select.defined_vars).next()
+        untyped_dest_var = next(rqlvar_maker(defined=select.defined_vars))
         # for each solution
         # 1. find each possible relation
         # 2. for each relation: