add sync of more attributes
This commit is contained in:
parent
916593fa19
commit
e56d2906df
|
@ -224,6 +224,19 @@ class SyncFromThemis(UtilityView):
|
|||
else:
|
||||
object.sanction_date = None
|
||||
|
||||
if data.get('reponse_a_question_ecrite'):
|
||||
object.written_answer = data.get('reponse_a_question_ecrite')[0]
|
||||
else:
|
||||
object.written_answer = None
|
||||
|
||||
if data.get('date_seance_ou_commission'):
|
||||
object.seance_com_date = datetime.date.fromordinal(
|
||||
datetime.datetime.strptime(
|
||||
data.get('date_seance_ou_commission'),
|
||||
'%Y-%m-%d').toordinal())
|
||||
else
|
||||
object.seance_com_date = None
|
||||
|
||||
for attr in ('numero_biq', 'numero_document', 'numero_bqr'):
|
||||
if data.get(attr):
|
||||
object.no = data.get(attr)
|
||||
|
@ -293,9 +306,16 @@ class SyncFromThemis(UtilityView):
|
|||
object.seance_vote = None
|
||||
|
||||
if data.get('portal_type') in ('PropositionD', 'ProjetD'):
|
||||
if data.get('date_seance'):
|
||||
object.seance_vote_date = datetime.date.fromordinal(
|
||||
datetime.datetime.strptime(
|
||||
data.get('date_seance'),
|
||||
'%Y-%m-%d').toordinal())
|
||||
else:
|
||||
object.seance_vote_date = None
|
||||
if data.get('vote_seance') == u'Adoption':
|
||||
object.adopted = True
|
||||
object.adoption_date = DateTime(data.get('date_seance'))
|
||||
object.adoption_date = DateTime(data.get('date_approbation_tutelle'))
|
||||
object.moniteur_date = DateTime(data.get('date_publication_moniteur_belge'))
|
||||
else:
|
||||
object.adopted = False
|
||||
|
|
Reference in New Issue