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()
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()