[fix] can not to_draft

conv_bal
watcha.h 2015-03-23 13:27:56 +07:00
parent d7866bea0e
commit 6b2e3b3da2
2 changed files with 5 additions and 3 deletions

View File

@ -980,9 +980,10 @@ class HDCase(Model):
'state': state,
})
# update sickbed
obj.sickbed_id.write({
'available': False,
})
if obj.sickbed_id:
obj.sickbed_id.write({
'available': False,
})
return {
'next': {

View File

@ -1,4 +1,5 @@
import time
from datetime import datetime, timedelta
from netforce.model import Model, fields, get_model