Esempio n. 1
0
 def commit_tokens(self, updates=None, deletes=None):
     updates = updates if updates is not None else []
     deletes = deletes if deletes is not None else []
     for token in updates:
         token_model = ActiveTokenModel.from_token(token)
         token_model.save()
     for token in deletes:
         token_model = ActiveTokenModel.from_token(token)
         token_model.delete()
Esempio n. 2
0
 def commit_tokens(self, updates=None, deletes=None):
     updates = updates if updates is not None else []
     deletes = deletes if deletes is not None else []
     for token in updates:
         token_model = ActiveTokenModel.from_token(token)
         token_model.save()
     for token in deletes:
         token_model = ActiveTokenModel.from_token(token)
         token_model.delete()
Esempio n. 3
0
 def archive_tokens(self, tokens):
     for token in tokens:
         active_token_model = ActiveTokenModel.from_token(token)
         active_token_model.delete()
         archived_token_model = ArchivedTokenModel.from_token(token)
         archived_token_model.save()
Esempio n. 4
0
 def archive_tokens(self, tokens):
     for token in tokens:
         active_token_model = ActiveTokenModel.from_token(token)
         active_token_model.delete()
         archived_token_model = ArchivedTokenModel.from_token(token)
         archived_token_model.save()