Pārlūkot izejas kodu

EmType: linked_types() is not usefull for now

ArnAud 9 gadus atpakaļ
vecāks
revīzija
bc75d357e0
1 mainītis faili ar 0 papildinājumiem un 26 dzēšanām
  1. 0
    26
      EditorialModel/types.py

+ 0
- 26
EditorialModel/types.py Parādīt failu

@@ -266,32 +266,6 @@ class EmType(EmComponent):
266 266
         # conn.execute(req)
267 267
         # conn.close()
268 268
 
269
-    ## @brief Get the list of linked type
270
-    # Types are linked with special fields called relation_to_type fields
271
-    # @return a list of EmType
272
-    # @see EmFields
273
-    def linked_types(self):
274
-        return self._linked_types_db()  # TODO changer l'appel
275
-
276
-    ## @brief Return the list of all the types linked to this type, should they be superiors or subordinates
277
-    # @return A list of EmType objects
278
-    # def _linked_types_db(self):
279
-    #     conn = self.db_engine.connect()
280
-    #     htable = self._table_hierarchy
281
-    #     req = htable.select(htable.c.superior_id, htable.c.subordinate_id)
282
-    #     req = req.where(sql.or_(htable.c.subordinate_id == self.uid, htable.c.superior_id == self.uid))
283
-    #
284
-    #     res = conn.execute(req)
285
-    #     rows = res.fetchall()
286
-    #     conn.close()
287
-    #
288
-    #     rows = dict(zip(rows.keys(), rows))
289
-    #     result = []
290
-    #     for row in rows:
291
-    #         result.append(EmType(row['subordinate_id'] if row['superior_id'] == self.uid else row['superior_id']))
292
-    #
293
-    #     return result
294
-
295 269
     ## Checks if the EmType is valid
296 270
     # @throw EmComponentCheckError if check fails
297 271
     def check(self):

Notiek ielāde…
Atcelt
Saglabāt