Revision d6400658
Added by Benjamin Dauvergne over 12 years ago
calebasse/actes/models.py | ||
---|---|---|
173 | 173 |
|
174 | 174 |
def set_state(self, state_name, author, auto=False, |
175 | 175 |
change_state_check=True): |
176 |
if not self.id: |
|
177 |
self.save() |
|
176 | 178 |
if not author: |
177 | 179 |
raise Exception('Missing author to set state') |
178 | 180 |
if not state_name in VALIDATION_STATES.keys(): |
Also available in: Unified diff
actes: set_state on unsaved Act should work