Audit database addition insert 2

This commit is contained in:
Tim Bentley 2009-09-23 18:36:22 +01:00
parent 51fb1533bd
commit 39f4cdfcc9
2 changed files with 5 additions and 7 deletions

View File

@ -22,8 +22,7 @@
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
###############################################################################
from datetime import date
from time import time
from datetime import datetime
import logging
from PyQt4 import QtCore, QtGui
@ -114,14 +113,13 @@ class AuditPlugin(Plugin):
"""
if self.auditActive:
audititem = AuditItem()
audititem.auditdate = date.today()
a = time.time()
audititem.audittime = time.time()
audititem.auditdate = datetime.today()
audititem.audittime = datetime.now().time()
audititem.title = auditData[0]
audititem.ccl_id = auditData[2]
audititem.authors = u''
for author in auditData[1]:
audititem.authors = author + u' '
audititem.authors += author + u' '
self.auditmanager.insert_audit(audititem)
def onUpdateAudit(self):

View File

@ -81,7 +81,7 @@ class AuditManager():
return True
except:
self.session.rollback()
log.excertion(u'Audit item failed to save')
log.exception(u'Audit item failed to save')
return False
def get_audit(self, id=None):