forked from openlp/openlp
Audit database addition insert 2
This commit is contained in:
parent
51fb1533bd
commit
39f4cdfcc9
@ -22,8 +22,7 @@
|
|||||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
from datetime import date
|
from datetime import datetime
|
||||||
from time import time
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
@ -114,14 +113,13 @@ class AuditPlugin(Plugin):
|
|||||||
"""
|
"""
|
||||||
if self.auditActive:
|
if self.auditActive:
|
||||||
audititem = AuditItem()
|
audititem = AuditItem()
|
||||||
audititem.auditdate = date.today()
|
audititem.auditdate = datetime.today()
|
||||||
a = time.time()
|
audititem.audittime = datetime.now().time()
|
||||||
audititem.audittime = time.time()
|
|
||||||
audititem.title = auditData[0]
|
audititem.title = auditData[0]
|
||||||
audititem.ccl_id = auditData[2]
|
audititem.ccl_id = auditData[2]
|
||||||
audititem.authors = u''
|
audititem.authors = u''
|
||||||
for author in auditData[1]:
|
for author in auditData[1]:
|
||||||
audititem.authors = author + u' '
|
audititem.authors += author + u' '
|
||||||
self.auditmanager.insert_audit(audititem)
|
self.auditmanager.insert_audit(audititem)
|
||||||
|
|
||||||
def onUpdateAudit(self):
|
def onUpdateAudit(self):
|
||||||
|
@ -81,7 +81,7 @@ class AuditManager():
|
|||||||
return True
|
return True
|
||||||
except:
|
except:
|
||||||
self.session.rollback()
|
self.session.rollback()
|
||||||
log.excertion(u'Audit item failed to save')
|
log.exception(u'Audit item failed to save')
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def get_audit(self, id=None):
|
def get_audit(self, id=None):
|
||||||
|
Loading…
Reference in New Issue
Block a user