示例#1
0
 def save_revision_log(self, doc, synclog, action):
     if doc["type"] == "resource":
         revisionlog = models.ResourceRevisionLog(resourceid=doc["resourceinstanceid"])
     elif doc["type"] == "tile":
         revisionlog = models.TileRevisionLog(tileid=doc["tileid"], resourceid=doc["resourceinstance_id"])
     revisionlog.survey = self
     revisionlog.revisionid = doc["_rev"]
     revisionlog.synclog = synclog
     revisionlog.action = action
     revisionlog.save()
示例#2
0
 def save_revision_log(self, doc, synclog, action):
     if doc['type'] == 'resource':
         revisionlog = models.ResourceRevisionLog(
             resourceid=doc['resourceinstanceid'], )
     elif doc['type'] == 'tile':
         revisionlog = models.TileRevisionLog(
             tileid=doc['tileid'], resourceid=doc['resourceinstance_id'])
     revisionlog.survey = self
     revisionlog.revisionid = doc['_rev']
     revisionlog.synclog = synclog
     revisionlog.action = action
     revisionlog.save()