[PATCH saem] [seda] Don't copy new_version_of relation

Sylvain Thenault sylvain.thenault at logilab.fr
Thu Apr 13 12:27:09 CEST 2017


# HG changeset patch
# User Sylvain Thénault <sylvain.thenault at logilab.fr>
# Date 1492075669 -7200
#      Thu Apr 13 11:27:49 2017 +0200
# Node ID 69d50b0e6564de38fc4418d42bfdaf0e6395ef48
# Parent  a3945adaf0b1d9b6bc0713413610b3c0eaebdceb
[seda] Don't copy new_version_of relation

it doesn't make sense. To avoid this, add it to Entity.cw_skip_copy_for as 'clone_of'
relation which is added there by the seda cube which introduce it.

diff --git a/cubicweb_saem_ref/site_cubicweb.py b/cubicweb_saem_ref/site_cubicweb.py
--- a/cubicweb_saem_ref/site_cubicweb.py
+++ b/cubicweb_saem_ref/site_cubicweb.py
@@ -157,10 +157,12 @@ def get_store(cnx):
 # implementation (using "container" relation or not)
 seda.GRAPH_SKIP_ETYPES.add('Activity')
 # also, the new_version_of relation should not be considered as part of the
 # graph (as for e.g. container or clone_of)
 seda.GRAPH_SKIP_RTYPES.add('new_version_of')
+Entity.cw_skip_copy_for.append(('new_version_of', 'subject'))
+Entity.cw_skip_copy_for.append(('new_version_of', 'object'))
 
 
 ####################################################################################################
 # temporary monkey-patches #########################################################################
 ####################################################################################################


More information about the saem-devel mailing list