add more document fields to sync process
This commit is contained in:
parent
3f24624b38
commit
ca7e7a4be6
|
@ -210,6 +210,13 @@ class SyncFromThemis(UtilityView):
|
|||
datetime.datetime.strptime(
|
||||
data.get(attr), '%Y-%m-%d').toordinal())
|
||||
|
||||
if data.get('date_sanction_promulgation'):
|
||||
object.sanction_date = datetime.date.fromordinal(
|
||||
datetime.datetime.strptime(
|
||||
data.get('date_sanction_promulgation'), '%Y-%m-%d').toordinal())
|
||||
else:
|
||||
object.sanction_date = None
|
||||
|
||||
for attr in ('numero_biq', 'numero_document', 'numero_bqr'):
|
||||
if data.get(attr):
|
||||
object.no = data.get(attr)
|
||||
|
@ -268,6 +275,16 @@ class SyncFromThemis(UtilityView):
|
|||
authors = [self.get_author_intid(x) for x in data.get('auteurs')]
|
||||
object.authors = [RelationValue(x) for x in authors if x]
|
||||
|
||||
if data.get('etat_en_commission'):
|
||||
object.commission_status = data.get('etat_en_commission')
|
||||
else:
|
||||
object.commission_status = None
|
||||
|
||||
if data.get('vote_seance'):
|
||||
object.seance_vote = data.get('vote_seance')
|
||||
else:
|
||||
object.seance_vote = None
|
||||
|
||||
if data.get('portal_type') in ('PropositionD', 'ProjetD'):
|
||||
if data.get('vote_seance') == u'Adoption':
|
||||
object.adopted = True
|
||||
|
|
Reference in New Issue