Project

General

Profile

« Previous | Next » 

Revision 55dfa03a

Added by Jérôme Schneider almost 13 years ago

actes: fix last_validation state save into set_state

View differences:

calebasse/actes/models.py
if not state_name in VALIDATION_STATES.keys():
raise Exception("Etat d'acte non existant %s")
current_state = self.get_state()
last_validation_state = ActValidationState(act=self,
last_validation_state = ActValidationState.objects.create(
act=self,
state_name=state_name,
author=author,
previous_state=current_state).save()
previous_state=current_state)
self.last_validation_state = last_validation_state
if state_name == 'VALIDE':
self.valide = True

Also available in: Unified diff