def create_hash_id(self, salt, string):
        if not self.hash_id:
            def generate_hash_id():
                return hashlib.sha1('%s%s%s' % (salt, string, str(time.time()))).hexdigest()[:11]
            self.hash_id = generate_hash_id()
            while(self.__class__.objects(hash_id=self.hash_id).first() is not None):
                self.hash_id = generate_hash_id()
dataset/ETHPy150Open DoubleCiti/daimaduan.com/daimaduan/models/__init__.py/BaseDocument.create_hash_id/original