ドメインページを最適化する
This commit is contained in:
@@ -35,6 +35,8 @@ def create_access_token(*, data: dict, expires_delta: timedelta = None):
|
||||
return encoded_jwt
|
||||
|
||||
def chacha20Encrypt(plaintext:str, key=config.KINTONE_PSW_CRYPTO_KEY):
|
||||
if plaintext is None or plaintext == '':
|
||||
return None
|
||||
nonce = os.urandom(16)
|
||||
algorithm = algorithms.ChaCha20(key, nonce)
|
||||
cipher = Cipher(algorithm, mode=None)
|
||||
|
||||
@@ -216,9 +216,9 @@ def edit_domain(
|
||||
update_data = domain.dict(exclude_unset=True)
|
||||
|
||||
for key, value in update_data.items():
|
||||
if(key != "id"):
|
||||
setattr(db_domain, key, value)
|
||||
|
||||
if key != "id" and not (key == "kintonepwd" and (value is None or value == "")):
|
||||
setattr(db_domain, key, value)
|
||||
print(str(db_domain))
|
||||
db.add(db_domain)
|
||||
db.commit()
|
||||
db.refresh(db_domain)
|
||||
|
||||
Reference in New Issue
Block a user