[seda tree] Stop returning rset in reparent
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Mon, 11 Dec 2017 13:22:32 +0100
changeset 2905 b6b20ce5dead
parent 2904 b5363236af61
child 2906 69ce3f55cd88
[seda tree] Stop returning rset in reparent this is not used (left-over of some debugging session?)
cubicweb_seda/views/jqtree.py
cubicweb_seda/views/sedatree.py
--- a/cubicweb_seda/views/jqtree.py	Thu Dec 07 14:42:49 2017 +0100
+++ b/cubicweb_seda/views/jqtree.py	Mon Dec 11 13:22:32 2017 +0100
@@ -1,4 +1,4 @@
-# copyright 2016-2017 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
+# copyright 2016 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
 # contact http://www.logilab.fr -- mailto:contact@logilab.fr
 #
 # This program is free software: you can redistribute it and/or modify it under
@@ -28,8 +28,8 @@
 def jqtree_reparent(self, child_eid, parent_eid):
     child = self._cw.entity_from_eid(child_eid)
     adapted = child.cw_adapt_to('IJQTree')
-    if adapted is not None:
-        return adapted.reparent(parent_eid)
+    assert adapted is not None
+    adapted.reparent(parent_eid)
 
 
 class IJQTreeAdapter(EntityAdapter):
--- a/cubicweb_seda/views/sedatree.py	Thu Dec 07 14:42:49 2017 +0100
+++ b/cubicweb_seda/views/sedatree.py	Mon Dec 11 13:22:32 2017 +0100
@@ -1,4 +1,4 @@
-# copyright 2016-2017 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
+# copyright 2016 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
 # contact http://www.logilab.fr -- mailto:contact@logilab.fr
 #
 # This program is free software: you can redistribute it and/or modify it under
@@ -78,7 +78,6 @@
         rset = self._cw.execute(
             'SET X seda_archive_unit P WHERE X eid %(x)s, P eid %(p)s',
             {'x': self.entity.eid, 'p': parent.eid})
-        return rset.rows
 
 
 class SimplifiedArchiveUnitIJQTreeAdapter(ArchiveUnitIJQTreeAdapter):
@@ -113,4 +112,3 @@
             ' REF seda_data_object_reference_id X,'
             ' X eid %(x)s, SEQ eid %(seq)s',
             {'x': self.entity.eid, 'seq': parent.eid})
-        return rset.rows