コード例 #1
0
ファイル: models.py プロジェクト: marniramesh/kuma
 def delete_if_exists(self):
     es = WikiDocumentType.get_connection()
     try:
         es.indices.delete(self.prefixed_name)
     except NotFoundError:
         # Can ignore this since it indicates the index doesn't exist
         # and therefore there's nothing to delete.
         pass
コード例 #2
0
ファイル: models.py プロジェクト: jamonation/kuma
 def delete_if_exists(self):
     es = WikiDocumentType.get_connection()
     try:
         es.indices.delete(self.prefixed_name)
     except NotFoundError:
         # Can ignore this since it indicates the index doesn't exist
         # and therefore there's nothing to delete.
         pass