From 15aa5d0286ec8d9464a2ef788eedb0a35a6bc011 Mon Sep 17 00:00:00 2001 From: Serghei MIHAI Date: Fri, 15 Nov 2013 14:50:38 +0100 Subject: [PATCH] no need to check speakers type as they are always a list Closes #3883 --- themis/importexport/sync.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/themis/importexport/sync.py b/themis/importexport/sync.py index 0a04379..70dfaf9 100644 --- a/themis/importexport/sync.py +++ b/themis/importexport/sync.py @@ -249,14 +249,7 @@ class SyncFromThemis(UtilityView): 'orateurs_en_seanceprop', 'orateurs_rapportcom', 'orateurs_seance_reponse_orale'): if data.get(attr): - speakers = data.get(attr) - # check if the speakers is a list, which is not a case if - # the field is of type 'Ministry or Deputy' - if isinstance(speakers, list): - object.speakers = list(set(object.speakers + speakers)) - else: - if speakers not in object.speakers: - object.speakers.append(speakers) + object.speakers = list(set(object.speakers + data.get(attr))) if data.get('rapporteurs'): object.reporters = data.get(attr)