No request with shell.

This commit is contained in:
Mikaël Ates 2015-01-06 18:20:45 +01:00
parent f8c167bb8e
commit 2c52ca2501
1 changed files with 4 additions and 1 deletions

View File

@ -213,8 +213,11 @@ class Act(models.Model):
self.valide = True
else:
self.valide = False
get_request().record('act-update', '{obj_id} state changed to {state} by {user} from {ip}',
try:
get_request().record('act-update', '{obj_id} state changed to {state} by {user} from {ip}',
obj_id=self.id, state=last_validation_state, user=author)
except:
pass
self.save()
def is_billable(self):