Add support for questionactualiteD
This commit is contained in:
parent
2adb49a403
commit
115b8add0c
|
@ -60,6 +60,7 @@ class Migrate(BrowserView):
|
||||||
'PFBGeneralCommission': u'Commissions divers',
|
'PFBGeneralCommission': u'Commissions divers',
|
||||||
'PFBChallenge': u'Interpellation',
|
'PFBChallenge': u'Interpellation',
|
||||||
'PFBWriteAnswer': u'Réponse écrite',
|
'PFBWriteAnswer': u'Réponse écrite',
|
||||||
|
'PFBCurrentEventsQuestion': u'''Question d'actualité''',
|
||||||
}.get(doc.get('meta_type'))]
|
}.get(doc.get('meta_type'))]
|
||||||
|
|
||||||
ob.expediteur = []
|
ob.expediteur = []
|
||||||
|
@ -89,6 +90,7 @@ class Migrate(BrowserView):
|
||||||
second_object_typename = {
|
second_object_typename = {
|
||||||
'PFBChallenge': 'interpellationD',
|
'PFBChallenge': 'interpellationD',
|
||||||
'PFBWriteAnswer': 'reponse_a_question_ecriteD',
|
'PFBWriteAnswer': 'reponse_a_question_ecriteD',
|
||||||
|
'PFBCurrentEventsQuestion': 'questionactualiteD',
|
||||||
}.get(doc.get('meta_type'))
|
}.get(doc.get('meta_type'))
|
||||||
if second_object_typename:
|
if second_object_typename:
|
||||||
# XXX: this is a temporary location, no decision has been taken yet
|
# XXX: this is a temporary location, no decision has been taken yet
|
||||||
|
@ -109,8 +111,7 @@ class Migrate(BrowserView):
|
||||||
if second_object_typename == 'reponse_a_question_ecriteD':
|
if second_object_typename == 'reponse_a_question_ecriteD':
|
||||||
if doc.get('authors'):
|
if doc.get('authors'):
|
||||||
ob2.ministre_auteur_reponse = self.get_ministry(doc.get('authors')[0])
|
ob2.ministre_auteur_reponse = self.get_ministry(doc.get('authors')[0])
|
||||||
elif second_object_typename == 'interpellationD':
|
elif second_object_typename in ('interpellationD', 'questionactualiteD'):
|
||||||
print 'authors:', doc.get('authors')
|
|
||||||
if doc.get('authors'):
|
if doc.get('authors'):
|
||||||
ob2.auteur = [self.get_deputy(x) for x in doc.get('authors')]
|
ob2.auteur = [self.get_deputy(x) for x in doc.get('authors')]
|
||||||
if doc.get('recipients'):
|
if doc.get('recipients'):
|
||||||
|
|
Reference in New Issue