From 64d0475df62cd2d20d0aa46db0f817350c6619ef Mon Sep 17 00:00:00 2001 From: Aidaho Date: Mon, 17 Jun 2024 07:46:01 +0300 Subject: [PATCH] v7.3.1.0: Return insert result in db module Modified the cred module in the db modules package. The insert statement under the try block was updated to return the result of the .execute() method. This will allow for better handling and control of the execution flow depending on the result of the insert operation. --- app/modules/db/cred.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/modules/db/cred.py b/app/modules/db/cred.py index 6dbd7215..15f23b97 100644 --- a/app/modules/db/cred.py +++ b/app/modules/db/cred.py @@ -25,7 +25,7 @@ def insert_new_ssh(name, enable, group, username, password): if password is None: password = 'None' try: - Cred.insert(name=name, enable=enable, groups=group, username=username, password=password).execute() + return Cred.insert(name=name, enable=enable, groups=group, username=username, password=password).execute() except Exception as e: out_error(e)