コード例 #1
0
    def del_note(self):
        """ Delete the note related with this dataset """
        try:
            # First delete the note
            note_id = self.note_id
            __notes__.del_note(note_id)
            # Then delete the reference to the note
            del self.note_id

        except AttributeError:
            print_error('No such note id exists.')
コード例 #2
0
 def del_note(self):
     """ Delete the note related with this model """
     try:
         # First delete the note
         note_id = self.note_id
         __notes__.del_note(note_id)
         # Then delete the reference to the note
         del self.note_id 
     except AttributeError:
         # Note does not exist, but don't print nothing becase there are a lot of models to delete
         pass
コード例 #3
0
    def del_note(self):
        """ Delete the note related with this dataset """
        try:
            # First delete the note
            note_id = self.note_id
            __notes__.del_note(note_id)
            # Then delete the reference to the note
            del self.note_id 

        except AttributeError:
            print_error('No such note id exists.')
コード例 #4
0
 def del_note(self):
     """ Delete the note related with this model """
     try:
         # First delete the note
         note_id = self.note_id
         __notes__.del_note(note_id)
         # Then delete the reference to the note
         del self.note_id 
     except AttributeError:
         # Note does not exist, but don't print nothing becase there are a lot of models to delete
         pass