Пример #1
0
 def save_edit(self, user={}, note='', edit_type=''):
     timestamp = datetime.datetime.now()
     edit = EditLog()
     edit.resourceclassid = self.graph_id
     edit.resourceinstanceid = self.resourceinstanceid
     edit.userid = getattr(user, 'id', '')
     edit.user_email = getattr(user, 'email', '')
     edit.user_firstname = getattr(user, 'first_name', '')
     edit.user_lastname = getattr(user, 'last_name', '')
     edit.note = note
     edit.timestamp = timestamp
     edit.edittype = edit_type
     edit.save()
Пример #2
0
 def save_edit(self, user={}, note="", edit_type=""):
     timestamp = datetime.datetime.now()
     edit = EditLog()
     edit.resourceclassid = self.graph_id
     edit.resourceinstanceid = self.resourceinstanceid
     edit.userid = getattr(user, "id", "")
     edit.user_email = getattr(user, "email", "")
     edit.user_firstname = getattr(user, "first_name", "")
     edit.user_lastname = getattr(user, "last_name", "")
     edit.note = note
     edit.timestamp = timestamp
     edit.edittype = edit_type
     edit.save()
Пример #3
0
 def save_edit(self, user={}, note='', edit_type=''):
     timestamp = datetime.datetime.now()
     edit = EditLog()
     edit.resourceclassid = self.graph_id
     edit.resourceinstanceid = self.resourceinstanceid
     edit.userid = getattr(user, 'id', '')
     edit.user_email = getattr(user, 'email', '')
     edit.user_firstname = getattr(user, 'first_name', '')
     edit.user_lastname = getattr(user, 'last_name', '')
     edit.note = note
     edit.timestamp = timestamp
     edit.edittype = edit_type
     edit.save()