Exemple #1
0
 def save(self):
     if self._new:
         self.experience = api_utils.post("/api/experiences", payload=self.document)
         self._new = False
     else:
         self.document = api_utils.patch("/api/experiences/" + self.document["uuid"], payload=self.document)
     return self
Exemple #2
0
 def save(self):
   if self._new:
     self.document = api_utils.post("/api/locations", payload=self.document)
     self._new = False
   else:
     self.document = api_utils.patch("/api/locations/" + self.document["uuid"], payload=self.document)
   return self