[server] remove some pre 3.10 compat
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Fri, 29 Jan 2016 10:04:35 +0100
changeset 11135 421520f4d516
parent 11131 2dafcdd19c99
child 11136 b14885133f90
[server] remove some pre 3.10 compat Let's assume nobody will try upgrading an instance from pre-3.10 cubicweb to 3.23+. If they do, they're setting themselves up for a lot of pain anyway.
cubicweb/server/sources/native.py
--- a/cubicweb/server/sources/native.py	Thu Feb 11 10:03:51 2016 +0100
+++ b/cubicweb/server/sources/native.py	Fri Jan 29 10:04:35 2016 +0100
@@ -923,7 +923,7 @@
                 self._handle_is_relation_sql(cnx,
                                              'INSERT INTO is_instance_of_relation(eid_from,eid_to) VALUES (%s,%s)',
                                              (entity.eid, eschema.eid))
-        if 'CWSource' in self.schema and source.eid is not None: # else, cw < 3.10
+        if source.eid is not None:  # else the source has not yet been inserted
             self._handle_is_relation_sql(cnx, 'INSERT INTO cw_source_relation(eid_from,eid_to) VALUES (%s,%s)',
                                          (entity.eid, source.eid))
         # now we can update the full text index